What is the character limit on URL
This question already has an answer here:
According to Microsoft it's 2048. Since they invented the internet (and also the light, the darkness and Linux) they are right. :-) .... or.. and since IE forces this lower value, it's the lowest common denominator.
http://support.microsoft.com/kb/208427
Under Firefox, I see people on the net reporting URLs of 0xFFFF working: http://forums.mozillazine.org/viewtopic.php?f=38&t=155648&start=0&st=0&sk=t&sd=a
Here is another post which talks about this: http://hiox.org/index.php?id=425
EDIT: this is very sad that almost 5 years after I wrote this answer - it is still true. If you can, look at the history of this answer.
EDIT2: I found a better answer on StackOverflow - What is the maximum length of a URL in different browsers?
There's no published maximum, but the effective limit is around 2,000 characters because that's what Internet Explorer (version 4 and above) supports. See http://www.boutell.com/newfaq/misc/urllength.html
Explanation
There is no thumb rule made for the maximum URL size of HTTP Get
Request as per RFC 2616 (Hypertext Transfer Protocol — HTTP/1.1 – Section 3.2.1).
Limits are imposed by various browsers and respective servers.
These limits must be considered collectively while passing the query string passed in the URL in any of the HTTP Requests.
If the URL size exceeds the URL Size limit imposed by the respective browser, the request will not be passed to the server & unnecessary effort will be required to debug & handle this situation.
Maximum URL Size By...
Browser
Internet Explorer
2048 B
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.
Mozilla Firefox
100 KB
The address bar doesn't shows any characters beyond 65,536 characters. But the URL size can be more than that , though you cannot view it in the address bar. This holds for FireFox 1.5 up until the current FireFox version
Opera
200 KB
The URL is completely visible in the address bar even at such a big range
Chrome,Safari
100 KB
Both browsers are webkit based and seems to have almost same limit as firefox
Server
Apache
128 KB
The size is changed using the LimitRequestLine setting of the server
IIS
16 KB
Default value is 16 KB and maximum limit is 16 MB
Lotus Notes
4 KB
Further Information
Very long URLs are not recommended at all.
For a web based application to be cross browser compatible, the Get
Method must not be used for passing very long strings, containing more than 2000 characters.
If you are facing a situation where you need to use URLs to contain huge number of characters, then give it another thought.
链接地址: http://www.djcxy.com/p/7266.html上一篇: referer的最大长度是多少?
下一篇: 什么是URL的字符限制