Thursday, August 21, 2008

Querystring limitation in Internet Explorer

Internet Explorer browser is having a nasty limitation on URL length in its address bar, it cannot contain more than 2083 characters, It will trim the string whatever comes after position 2083. This applies from IE 4.0 to IE 7.0.

This limitation is only for HTTP GET request not on HTTP POST request

On the other hand Firefox 3.0 allowed me to paste >2,40,000 chars. So developers beware of IE while passing lengthy query strings from your web application, your code has a chance of failing on browser compatibility testing.

Keep in mind that the number of characters will be significantly reduced if you have special characters (e.g. spaces) that need to be URLEncoded (e.g. converted to the sequence '%20'). For every space, you reduce the size allowed in the remainder of the URL by 2 characters - and this holds true for many other special characters that you may encode before sending the URL to the client.

MSFT KB Article : http://support.microsoft.com/kb/q208427/

No comments: