Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Max length of query string in an AJAX GET request?

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?

like image 712
Sam Lee Avatar asked Aug 28 '09 01:08

Sam Lee


People also ask

What is the maximum length of a GET request?

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.

What is the maximum possible length of a query string?

Although officially there is no limit specified by RFC 2616, many security protocols and recommendations state that maxQueryStrings on a server should be set to a maximum character limit of 1024. While the entire URL, including the querystring, should be set to a max of 2048 characters.

How long can be URL query?

In Firefox the length of the URL can be unlimited but practically after 65,536 characters the location bar no longer displays the URL. Edge allows the URL length to be a maximum of 2083 characters but not more than 2048 characters in the path portion of the URL. Opera allows the URL length to be unlimited.

What is the default maximum length for URL characters in asp net?

Property Value The length of the URL, in number of characters. The default is 260.


2 Answers

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.

like image 146
cletus Avatar answered Sep 24 '22 04:09

cletus


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.

like image 28
Noon Silk Avatar answered Sep 20 '22 04:09

Noon Silk