Question: Does the URI Length Recommendation of 255 bytes Matter Anymore?

by M. David Peterson

RFC 2068: Section 3.2.1: General Syntax

Note: Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.


Okay, so if I'm making a web service call to a particular URI it's more than likely going to be inside of my own code base as opposed to inside of someone's client. And in the cases that it's not chances are pretty good that this same client doesn't support the extended functionality of my shiny new asynchronous Web 2.x+ app. So whether or not a client supports URI lengths over 255 bytes is probably less of a concern given that these same clients couldn't support my application in the first place.

But let's set aside the most likely client-side scenarios and assume nothing: RFC 2068 is about a week shy of being 11 years old. Is the 255 byte URI length recommendation still applicable? From the client perspective, possibly not. But what about from the proxy perspective? And are there clients (possibly mobile browsers?) that I'm not taking into consideration that still impose a limitation on the URI length?

NOTE: As of October 27th, 2007 the limit inside of Internet Explorer is 2083 bytes. Is 2083 bytes today's equivalent of the 255 byte recommendation of 11 years ago? (You would have to assume that MSFT didn't arbitrarily arrive at this figure, basing the limitation on known limitations of the existing infrastructure of the Internet, correct?)

6 Comments

anon
2007-12-23 07:10:02
you expect a non-arbitrary microsoft limit? come off it.
jonblock
2007-12-23 08:45:45
As of a few months ago, Outlook 2003 SP2 on systems in my office would routinely crash upon clicking a link around 255 bytes long or longer. Whether that "limit" is in Outlook, IE6.1, or the inter-process communication between the two, I couldn't say. Seems more of a bug than an intentional limit, but it might be a relevant data point on clients in the wild.
M. David Peterson
2007-12-23 13:01:35
@anon,


>> you expect a non-arbitrary microsoft limit? come off it. <<


:D Expect, no. Wish, yes. ;-)

M. David Peterson
2007-12-23 13:03:00
@jonblock,


>> Seems more of a bug than an intentional limit, but it might be a relevant data point on clients in the wild. <<


Does seem like a bug, but whether it's a bug or not, it's certainly relevant. Thanks for the info!

Brian McCallister
2007-12-23 17:46:29
1024 is max as some proxies truncate for you :-/


In practice I try to keep it under 512.

M. David Peterson
2007-12-23 19:16:05
@Brian,


>> 1024 is max as some proxies truncate for you :-/


Yeah, I've heard of such practices, but was unsure of what the "cutoff" point was. Thanks for the info!


>> In practice I try to keep it under 512.


Makes sense. There's really no need to push it out past that point. If you're packing that much info into the URI you should probably be doing something different (GET/POST w/ XML Payload, or something similar.)


Thanks for sharing, Brian!