Home > Web Standards > Maximum URL Size in HTTP GET Request

Maximum URL Size in HTTP GET Request

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.

To avoid this kind of a situation, one must account for this possibility in earlier stages of development. I have compiled the limits and other basic information regarding the HTTP Get Request

Browser Maximum URL Size Remarks
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 Maximum URL Size Remarks
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

Let’s understand the basic difference between a GET Request and a POST Request. GET requests are made to request a particular resource from the server. Whatever information is required to fetch the desired resource are passed as query string parameters. While POST Requests are made to post some data to a particular resource for processing as well as request a response. We should not use GET Requests to have data posted to the server, it should only be used, as its name suggests, to get a particular resource from the server. There is a thin but very clear line between logical usage of both

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

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: