| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
URL General Syntax (Page 3 of 4) Omission of URL Syntax Elements The full URL syntax may seem very complicated, but bear in mind that this is a formal definition and shows all of the possible elements in a URL at once. Most schemes do not use every one of these elements, and furthermore, many of them are optional even when they are valid in a particular scheme. For example, the <login> and <password> are officially supported for HTTP URLs, but are very rarely used. Similarly, port numbers are most often omitted, telling the client software to just use the default port number for the scheme. The next topic describes some of the most common URL schemes and the specific syntaxes used for them, including discussing how and when these elements are employed. Even though the richness of the URL syntax isn't often needed, it can be useful for supplying a wide variety of information in special cases. URLs are also very flexible in terms of how they may be expressed. For example, while a <host> is usually a DNS name, it can also be an IP address expressed in many forms including dotted-decimal, regular decimal, hexadecimal, octal and even a combination of these. Unfortunately, the lack of familiarity that most people have with some of these esoterics has led to URLs being abused through deliberate obscuration, to get people to visit resources they would normally want to avoid. Technically, a <fragment> is not considered a formal part of the URL by the standards that describe resource naming. The reason is that it only identifies a portion of a resource, and is not part of the information required to identify the resource itself. It is not sent to the server but retained by the client software, to guide it in how to display or use the resource. Some would make a valid argument, however, that this distinction is somewhat arbitrary; consider, for example, that the scheme itself is also used only by the client, as is the host itself. The most common example of a URL fragment is specifying a particular bookmark to scroll to in displaying a Web page. In practice, a fragment identifier is often treated as if it were part of a URL since it is part of the string that specifies a URL.
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. |