The difference between GET and POST methods, the maximum length of the Get method can be passed in the end of the string is how much?

The difference between GET and POST methods, the maximum length of the Get method can be passed in the end of the string is how much? Was introduced, if you use the GET method of transmission parameters, maximum URL length is 256 bytes, believe that.

But recently I saw some long url, able to work in IE, copy down a bit length estimates, about 650 bytes, far more than the length of 256 bytes. At this time of the previous statement could not help but have some doubts - with the major search engines turned over and over, and finally found the most authoritative interpretation --Maximum URL length is 2,083 characters in Internet Explorer .--- maximum uniform resource locator (URL) Microsoft Internet Explorer length of 2,083 characters. .

Internet Explorer maximum path length of 2,048 characters. This limit applies to the POST request and GET request URL.

If you use the GET method is limited to a maximum of 2,048 characters, minus the number of characters in the actual path.

However, POST method is not submitted URL limit the size of the name / value pairs. The transmission in the title, rather than transfer in the URL.

RFC 2616, "Hypertext Transfer Protocol - HTTP / 1.1", any requirement for URL of unspecified length.

Yes, url IE is the maximum length of 2083 bytes, can be used to transfer data GET length is 2048 bytes, this number is not small, far more than 256 which was once considered very correct number.

Further POST method of data transfer from the impact length, its value header transmitted by the browser, rather than url.

Browser

After the actual test:

1, URL addresses in the total length of IE8: 4076, exceeding this length will automatically ignore the content of the latter;

2, the total length of the URL in the address in firefox 25 can be achieved: 7530, will exceed the length of the access error;

3, the maximum total length chrome 29.0.1547.62 reach: 7675, will exceed the length of the access error;

Thus, in the previous browser, the URL for the maximum length of perhaps 256 is possible (current or previous versions can not find IE6 to test), as the length of an upgrade will be supported browser with the changes .

server

1、apach

apache can accept url length is limited to 8192 characters

2、IIS

Microsoft Internet Information Server (IIS) can accept url length is limited to 16,384 characters.

3、Perl HTTP::Daemon

Perl HTTP :: Daemon can at least accept the url length limit of 8000 characters. Perl HTTP :: Daemon HTTP request headers limits the total length of no more than 16,384 bytes (not including the post, file uploads, etc.). But when the url returns a 413 error when more than 8000 characters.
This limit may be modified, in 16 × 1024 Daemon.pm find and change to a larger value.

4, ngnix

Url length limit may be changed by modifying the request url string configuration.

client_header_buffer_size Defaults:client_header_buffer_size 1k

large_client_header_buffersDefaults:large_client_header_buffers 4 4k/8k

Precautions:

Since the cross-domain request only through jsonp get request, url length have different limits depending on the browser and the server.
To support IE, then, url length is limited to 2083 characters, if Chinese characters, then only 2083/9 = 231 characters.
If the Chrome browser supports Chinese characters maximum Only 8182/9 = 909.

Guess you like

Origin www.cnblogs.com/Javi/p/11577303.html