HTML and CSS Reference
Unclear Case Sensitivity
Are URLs case sensitive? The answer is, it depends. Domains are not case sensitive.
Addresses can be written as www.Democompany.com or www.DEMOCOMPANY.com. A
browser should handle both properly. Case typically is changed for marketing or branding
purposes. However, directory names and filenames following the domain name might be
case sensitive, depending on the operating system that the Web server is running on. For
example, UNIX systems are case sensitive, whereas Windows machines are not. Then the
question arises of query string names and values. Serious trouble can ensue when you are
sloppy with case. Assume URLs are case sensitive to avoid headaches.
Unclear Length Limits
How long can a URL be? The answer is unclear. Some documentation suggests low limits,
around 255 or 1,024 characters. Other documents indicate there are no limits—the answer is
dependent upon many factors. For example, user agents will vary with some supporting
user agents and web servers, whatever a system's maximum string length is. While others
are more restrictive or have bugs that restrict URLs to a bit over 1,000 characters. Add in
Web servers and security systems, which may have their own limits on allowed URL
lengths, and you get the simple answer—nobody knows what the limit may be. Web page
authors should assume the worst and use short URLs, 255 chars or lower if at all possible.
Documents move around, servers change names, and documents might eventually be
deleted. This is the nature of the Web, and the reason why the 404 Not Found message is so
common. When users hit a broken link, they might be at a loss to determine what happened
to the document and how to locate its new home. Wouldn't it be nice if, no matter what
happened, a unique identifier indicated where to get a copy of the information? Links can
be maintained and errors carefully tracked, but how many developers are really that careful
with their URLs?
Long, Dirty URLs
People often have to transcribe addresses. For example, the following is quite a lot to type,
read to someone, or avoid not breaking across lines in an e-mail:
Firms are already scrambling for short domain names and paths to improve the type-
ability of URLs, and most folks tend to omit the protocol when discussing things. Despite
these minor clean-ups, many URLs are very long and “dirty,” filled with all sorts of special
characters, encouraging fiddling by the mischievous.
Short, Cryptic URLs
Admittedly, URLs can get too long to reasonably type or remember. Worse yet, they may
simply be too long for a 140-character Twitter message. Web developers may employ a
shortened URL. For example, http://tinyurl.com/c3l7cq takes you to the archaic server-side
image map example at http://htmlref.com/ch7/serverimagemap.html. The shorter URL