URL最大长度到底是多少

Web开发的常见问题: "URL 的最大长度是多少?"

答案是:HTTP协议标准并没有规定URL的最大长度。

RFC文档: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2

 

The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).

Note: Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths.

  虽然标准没有规定长度,不同的浏览器对URL做一定限制。 IE的URL长度上限是2083http://support.microsoft.com/kb/208427

  来源:http://blog.csdn.net/wingeek/article/details/4302406

加支付宝好友偷能量挖...


评论(0)网络
阅读(129)喜欢(1)操作系统及应用软件