1:GET访问 浏览器 认为 是等幂的
就是 一个相同的URL 只有一个结果[相同是指 整个URL字符串完全匹配]
所以 第二次访问的时候 如果 URL字符串没变化 浏览器是 直接拿出了第一次访问的结果
POST则 认为是一个 变动性 访问 (浏览器 认为 POST的提交 必定是 有改变的)
防止 GET 的 等幂 访问 就在URL后面加上 ?+new Date();,[总之就是使每次访问的URL字符串不一样的]
设计WEB页面的时候 也应该遵守这个原则
2:一.谈Ajax的Get和Post的区别
Get方式:
用get方式可传送简单数据,但大小一般限制在1KB下,数据追加到url中发送(http的header传送),也就是说,浏览器将各个表单字段元素及
其数据按照URL参数的格式附加在请求行中的资源路径后面。另外最重要的一点是,它会被客户端的浏览器缓存起来,那么,别人就可以从浏览器的历史记录中,
读取到此客户的数据,比如帐号和密码等。因此,在某些情况下,get方法会带来严重的安全性问题。
Post方式:
当使用POST方式时,浏览器把各表单字段元素及其数据作为HTTP消息的实体内容发送给Web服务器,而不是作为URL地址的参数进行传递,使用POST方式传递的数据量要比使用GET方式传送的数据量大的多。
总之,GET方式传送数据量小,处理效率高,安全性低,会被缓存,而POST反之。
分享到:
相关推荐
一个关于post和get方式传输数据的不同点的分析
PHP封装cUrl库,实现post登录,get请求资源。支持cookie。 内附使用方法,公司打卡的小案例。
import postAndGet_result.java 事务开始 public static void main(String[] args) { //发送 GET 请求 String s=postAndGet_result.sendGet("http://localhost:xxxxxx", "key=123&v=456"); System.out....
中国最大的物联网云平台Yeelink,为您提供传感器云服务; 并通过实时数据处理, 为您提供安全可靠的状态监控。
用于VC & VS C++开发 Http封装类,无需再次封装
強大HTTP TOOL AT Qt, 支援post and get
Get Post实现,支持cookie定义
General POST and GET commands shall be covered here. Chapter 3, Working with Taxonomies and Users with REST API, moves to taxonomies such as categories and tags. Users and user roles will also be ...
用户在开发或者调试网络程序或者是网页B/S模式的程序的时候是需要一些方法来跟踪网页请求的,用户可以使用一些网络的监视工具比如著名的Firebug等网页调试工具。今天给大家介绍的这款网页调试工具不仅可以调试简单的...
用来测试webapi接口,get和post请求测试,用来测试webapi接口,get和post请求测试,
Docker example for Post and Get request
Android HttpUrlConnection使用方法 post and get json.
AJAX发送请求与接受,入门知识很好很基出,POSTANDGET
* *描 述:实现HTTP协议中的GET、POST请求 * *使 用:HttpProc.WebClient client = new HttpProc.WebClient(); client.Encoding = System.Text.Encoding.Default;//默认编码方式,根据需要设置其他类型 client....
The WinHTTP is easy to use WinInet-based HTTP client component which allows to post and get any data from the Web via HTTP protocol.
The WinHTTP is easy to use WinInet-based HTTP client component which allows to post and get any data from the Web via HTTP protocol.
Get familiar with using plugins, and extend PostCSS with the API Build a fully working custom preprocessor and test it on different sites such as WordPress Write a custom syntax in PostCSS while still...
本文实例讲述了python通过get,post方式发送http请求和接收http响应的方法。分享给大家供大家参考。具体如下: 测试用CGI,名字为test.py,放在apache的cgi-bin目录下: #!/usr/bin/python import cgi def main(): ...
Retrofit Okhttp辅助类的简单封装,vesion 1.0.X 实现了Get,Post-Form、Post-Json 三种形式的网络请求,后续版本会实现文件上传下载and各类raw的请求方式。
1.1 Goals of a Plug and Play System BIOS 4 1.2 Enhancements to the current BIOS architecture 5 1.3 Elements of the Plug and Play BIOS architecture 6 1.3.1 Bi-modal functionality 6 1.3.2 OS ...