post和get的区别 - 强桓瑞

WBOY
Release: 2016-05-21 08:54:46
Original
946 people have browsed it

1.get会在地址栏上显示用户信息,安全性低;post采用加密形式进行传输,不显示,安全性高

2.get相比post提交方式更快,因为post封装了一次消息再发送(加密)

3.get方式请求的数据放在http消息头中,post方式是把提交的数据放在http正文中

4.get主要用于查询,不修改服务器上的数据;post会发送修改请求,从而修改服务器上的数据

5.get可以添加书签,可以被缓存,post不行

 <form action="" method="get">
   用户名<input type=&ldquo;text" name="user">
  密码 <input type=&ldquo;possword" name="possword">
  <input type=" submit" value="提交&ldquo;>
</form>
     
Copy after login

  

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