views:

24

answers:

3

What is the limit on QueryString / GET / URL parameters

A: 

I remember something that the standard defines 1024 bytes for URL's (including query string) but I also read somewhere that Internet Explorer accepts up to 2083 characters. Probably quite browser dependent...

Koen
A: 

There is no defined limit. However, RFC 2068 states:

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 should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.

Matteo Mosca
+1  A: 

There is no limit in theory. For HTTP URLs, the HTTP 1.1 specification states:

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).

But in practice, many clients and servers do only support URLs up to a certain length. The thumb of rule is not to use URLs longer than 2000 characters (percent encoding already taken into account).

Gumbo