How long of a URL can Internet Explorer 9 take?

Not the most precise answer, but it looks like 2083 characters in the address bar and 5165 characters when following a link.

(Not official in any way, just plugged a URL with 41,000 chars into a test HTM file and used Javascript to query the URL length.)

Update:

To reproduce the test, create an HTML file with an anchor element whose HREF attribute is 6000 characters long. Open the file in your browser and click the link. Then pop open the console and check window.location.href.length.

Following this procedure in IE9 today, it reports the length as 5165 characters. If I load the same URL manually through the address bar, it reports 2083 characters.

For what it’s worth, IE seems to truncate the URL before sending the request. If I put a URL of 24,000 characters in the anchor’s HREF attribute, IE will follow the link but the resulting page reports a url length of 5165 characters. Following the same link in Chrome results in a HTTP 414 response from my test server.

Leave a Comment