Maximum number of characters in URL

Posted by – August 4, 2009

I ran a quick test to find out how length a URL can be. The result turned out to be browser dependent. :-( Another browser compatibility issue. I have Firfox 3.5, Opera 9, Safari 4.0.2 and IE7. I don’t have Google Chrome as I feel its a (cheap bollywood style) rip off of Webkit. I create a dummy URL quite lengthy, around 3012 chars long. My intelligence said no browser will support a URL lengthier than 256 chars. How intelligent of me? 8-|

IE only supported 2083 chars. I tried copy pasting the whole 3012 char long URL in address bar but it only accommodated 2083 chars. Have a look at this MSDN link. Damn it!

I used strlen from PHP and String.length from old faithful JavaScript to find the length of URL and both returned same results.

What about FF, Opera and Safari?

All three were OK with 3012 chars. :-? I didn’t try to find the max length of chars. Still majority of web surfers depend on IE. Anything that is not accepted by IE is a possible risk. So I decided to end my research here.

browsers just ain’t no good,
a thing that’s well understood,
you can see it everywhere you look,
browsers just ain’t no good…

– Lyrics by Kumar Chetan Sharma ripped off from wonderful track “People ain’t no good”, sung by Nick Cave from Nick Cave and the Bad Seeds.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>