views:

619

answers:

3

Is there/what is the maximum length of the query string when doing an AJAX GET request? More specifically, I am doing cross-domain AJAX using an image:

img = new Image();
img.src = "http://www.otherdomain.com/something.gif?long_query_string=long........";

What is the limit on the query string here?

A: 

Yes, Query Strings have a maximum length, IIRC it's 2048 chars, or something similar. Though specific implementations probably differ.

Wikipedia has a little bit of info.

Noon Silk
A: 

Max length for a GET is 2,048 characters =]

Shahin
+2  A: 

There is no defined limit in any specification. The effective or prescribed limit is 2048 characters. Certain browsers and Webserver will have problems with longer.

cletus