Home > Backend Development > PHP Tutorial > THINKPHP 表单提交方式效率疑问

THINKPHP 表单提交方式效率疑问

WBOY
Release: 2016-06-23 09:09:38
Original
890 people have browsed it

1、当插入大量数据时,ajax和普通post哪个效率更高?
2、当查询大量数据时,ajax、普通get、普通post哪个效率更高?


回复讨论(解决方案)

都一样!
表单内置有 get、post 提交
Ajax 通过 XMLHttpRequest 组件完成 get、post

如果一定要抠字眼,肯定post效率最低,但是这种差异真的能在你的业务逻辑中体现出来的话估计你也不会来这里问这种问题了。所以随意用吧,不过出于对用户体验优化的考虑,建议用ajax做提交和查询

查询大量数据的话,查询条件多了get提交是不行的,需要用post,

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template