The optimum limit for URL length? 100, 200+

asp.net

I have an ASP.Net 3.5 platform and windows 2003 server with all the updates.

There is a limit with .Net that it cannot handle more than 260 characters. Moreover if you look it up on web, you will find that IE 6 fails to work if it is not patched at above 100 charcters.

I want to have the rewrite path module to be supported on maximum number of browsers, so I am looking for an acceptable limit to which I can create verbose URL's.

Best Answer

A Url is path + querystring, and the linked article only talks about limiting the path. Therefore, if you're using asp.net, don't exceed a path of 260 characters. Less than 260 will always work, and asp.net has no troubles with long querystrings.

http://somewhere.com/directory/filename.aspx?id=1234
                                             ^^^^^^^- querystring
                    ^^^^^^^^^^^^^^^^^^^^^^^^ -------- path

Typically the issue is with the browser. Long ago I did tests and recall that many browsers support 4k url's, except for IE which limits it to 2083, so for all practical purposes, limit it to 2083. I don't know if IE7 and 8 have the limitation, but if you're going to broad compatibility, you need to go for the lowest common denominator.