| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
URL Length and Complexity Issues (Page 2 of 4) Reasons Why Long URLs are Common The point that many elements in URL syntax are optional is important. The majority of the time, most of these optional parts are omitted, which makes URLs much simpler in practical use than they are on paper. For example, even though an HTTP URL theoretically contains a user name, password, host, port, path, query and bookmark, most URLs use only a host name and a path. This is what helps keep URLs short and easy to use. Despite this, you will still find some rather long URLs used on the Internet. Here are some of the most common reasons why. Some people don't realize that long host names are hard to remember. If you run the Super Auto Body Shop & Pizza Parlor, having a Web site called www.superauto.com will make it easier for your customers to find you than trying to register www.superautobodyshopandpizza.com. Yet DNS names of 15, 20 or even more characters are surprisingly common. Similarly, short file names are better than long ones, and again, many people don't think about this before putting files on the Internet, which makes things more difficult for those who must access them. URLs have a mechanism for dealing with unsafe characters, but it makes them longer and harder to decipher. Suppose you have a file named: {ABC Corp} budget; draft #3; third quarter 2004.htm The URL for this will have to be: %7BABC%20Corp%7D%20budget%3B%20draft%20%233%3B%20third%20quarter%202004.htm The original long file name was readable, but the URL is a mess because of the special character encodings. Naming the file ABC budget draft 3, 3Q2004.htm would be a better choice, and still includes enough information to be understandable. Even better, you could replace the spaces with underscores, to avoid the need for %20s entirely: ABC_budget_draft 3,_3Q2004.htm. In HTTP URLs, the syntax for specifying a query (following a question mark character) is often used to allow a Web browser to send various types of information to a Web server, especially parameters for interactive queries. These parameter strings can get quite lengthy. For example, I typed in a query to the great Web search engine Google to find recipes for potato salad. This is what the URL for one of the recipe files looks like: http://groups.google.com/groups?q=%22potato+salad%22&hl=en&lr=&ie=UTF-8&safe=off&selm=B826FB57.89C0%25sbrooks%40ev1.net&rnum=2. Almost all of that consists of parameters that tell the Google server exactly what document I want based on my query. It is necessary, but still cumbersome.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |