[sclug] URL encoding/decoding question

Dickon Hood sclug at splurge.fluff.org
Sun Feb 19 19:06:37 UTC 2006


On Sun, Feb 19, 2006 at 18:20:08 +0000, David Given wrote:

: I discovered that most web browsers fail, horribly, when dealing with very 
: long URLs. I had a number of outright crashes, some deeply bizarre graphics 
: corruption when displaying the URL bar text, and occasionally the text of the 
: URL itself would get mangled. This was testing with Mozilla and Internet 
: Explorer (it was all pre-Firefox).

: I sincerely hope that the crashes have been fixed by now, but they've probably 
: been replaced with arbitrary limits to how long you can make a URL; either 
: way, storing large amounts of data in a URL is definitely *not* a viable 
: solution to anything...

Er, IIRC, HTTP URIs are only guaranteed to work for up to 256 characters
or so, with most clients and servers expected to cope with 1KB.  This is
one reason for the METHOD=POST HTML form parameter.

IE, according to a bit of googling, manages to cope with 2083 bytes.

There's nothing wrong with URL-encoding arbitrary strings, though, to cope
with storage mechanisms that can't handle embedded linefeeds or spaces or
whatnot.  As I said before, it's a technique I've used in the past
(storing such strings in RFC822 headers, for example), but I wouldn't use
it for storing data in an SQL database.

-- 
Dickon Hood

Due to digital rights management, my .sig is temporarily unavailable.
Normal service will be resumed as soon as possible.  We apologise for the
inconvenience in the meantime.

No virus was found in this outgoing message as I didn't bother looking.


More information about the Sclug mailing list