经典收藏----URL的长度限制,以及get post区别[转载]
这个是官方的解释:http://support.microsoft.com/default.aspx?scid=kb;EN-US;q208427
长度是2083字节,路径的最大长度是2048字节, post和get都是,这已经远大于传说的256了(之前为了兼容老client的一个说明)
SUMMARY
Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs.
If you are using the GET method, you are limited to a maximum of 2,048 characters, minus the number of characters in the actual path.
However, the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL.
RFC 2616, "Hypertext Transfer Protocol -- HTTP/1.1," does not specify any requirement for URL length.
REFERENCES
For a further breakdown of the components, see the Wininet header file.
For more information, see "General Syntax," section 3.2.1 of RFC 2616, "Hypertext Transfer Protocol -- HTTP/1.1," at the following Internet Society Web site:ftp://ftp.isi.edu/in-notes/rfc2616.txt
下面的文章取自RFC更加的权威了http://classicasp.aspfaq.com/forms/what-is-the-limit-on-querystring/get/url-parameters.html
What is the limit on QueryString / GET / URL parameters?
RFC 2068 states:
Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.
The spec for URL length does not dictate a minimum or maximum URL length, but implementation varies by browser. On Windows: Opera supports ~4050 characters, IE 4.0+ supports exactly 2083 characters, Netscape 3 -> 4.78 support up to 8192 characters before causing errors on shut-down, and Netscape 6 supports ~2000 before causing errors on start-up.
Note that there is no limit on the number of parameters you can stuff into a URL, but only on the length it can aggregate to.
Keep in mind that the number of characters will be significantly reduced if you have special characters (e.g. spaces) that need to be URLEncoded (e.g. converted to the sequence '%20'). For every space, you reduce the size allowed in the remainder of the URL by 2 characters - and this holds true for many other special characters that you may encode before sending the URL to the client.
Keep in mind, also, that the SGML spec declares that a URL as an attribute value (e.g. <a href='{url}'>) cannot be more than 1024 characters. Similarly, the GET request is stored in the server variable QUERY_STRING, which can have similar limitations in certain scenarios.
If you are hitting a limit on length, you should consider using POST instead of GET. POST does not have such low limits on the size of name/value pairs, because the data is sent in the header, not in the URL. The limit on POST size, by default, is 2 MB on IIS 4.0 and 128 KB on IIS 5.0. POST is also a little more secure than GET -- it's tougher (though not impossible) to tinker with the values of POSTed variables, than values sitting in the querystring.
See Article #2223 for more information on using POST to overcome limitations on length.
下面的文章讲述克服get的长度限制, 使用post
http://classicasp.aspfaq.com/forms/what-is-the-limit-on-querystring/get/url-parameters.html
转自 http://www.80x86.cn/article.asp?id=1327
阅读更多- get,post数据长度的限制 2 GET与POST方法的区别
- 1 get,post数据长度的限制 2 GET与POST方法的区别
- 浏览器和服务器 对http请求(post get) url长度限制
- get,post数据长度的限制 2 GET与POST方法的区别
- 关于get与post传递参数容量大小限制区别以及curl函数与file_get_contents的区别(面试)
- HTTP 请求方式: GET和POST的比较当发送数据时,GET 方法向 URL 添加数据;URL 的长度是受限制的(URL 的最大长度是 2048 个字符)。
- 1 get,post数据长度的限制 2 GET与POST方法的区别
- curl post get 长度限制
- GET POST方法长度限制
- 转载只为记录经典之<轻量级进程和普通进程以及线程之间的区别>
- 表单向后台提交数据,get和post的两种方式的根本区别以及如何处理乱码?
- get,post字数长度限制
- 关于Http Get方法提交URL最大长度的限制
- Ajax访问不断变化的session的值不同步解决方法以及HTTP协议中的GET、POST的区别
- POST和GET以及同步请求和异步请求的区别
- HTTP请求和响应——GET与POST区别以及SOAP(网络整理)
- Get方法提交URL的最大长度限制(转)
- 转载:GET和POST有什么区别
- ajax请求post和get的区别以及get post的选择
- GET POST方法长度限制