Uniform Resource Locator
Encyclopedia : U : UN : UNI : Uniform Resource Locator
- URL redirects here. For other uses of URL, see URL (disambiguation).
http://en.wikipedia.org/wiki/Uniform_Resource_Locator .An , commonly called a web address, is usually shown in the address bar of a web browser.
The term is typically pronounced as either a spelled-out initialism ("yoo arr ell") or as an acronym (earl or ural as in the Ural Mountains).
Tim Berners-Lee created the URL in 1991 to allow the publishing of hyperlinks on the World Wide Web, a fundamental innovation in the history of the Internet. Since 1994, the URL has been subsumed into the more general Uniform Resource Identifier (URI), but URL is still a widely used term.
The U in URL has always stood for Uniform, but it is sometimes described as Universal, perhaps because URI did mean Universal Resource Identifier before
Definition
URIs and URLs
Every URL is a type of Uniform Resource Identifier (URI), or, more precisely, the set of URLs is a proper subset of the set of URIs. A URI identifies a particular resource while a URL both identifies a resource and indicates how to locate it. To illustrate the distinction consider the URI urn:ietf:rfc:1738 which identifies IETF RFC 1738 without indicating where to find the text of this RFC. Now consider three URLs for three separate documents containing the text of this RFC:
- http://www.ietf.org/rfc/rfc1738.txt
- http://www.w3.org/Addressing/rfc1738.txt
- http://rfc.sunsite.dk/rfc/rfc1738.html
Historically, the terms have been almost synonymous as almost all URIs have also been URLs. For this reason, many definitions in this article mention URIs instead of URLs; the discussion applies to both URIs and URLs.
URL scheme
A URL is classified by its scheme, which typically indicates the network protocol used to retrieve a representation of the identified resource over a computer network. A URL begins with the name of its scheme, followed by a colon, followed by a scheme-specific part.
Some examples of URL schemes:
- http - HTTP resources
- https - HTTP over SSL
- ftp - File Transfer Protocol
- mailto - E-mail address
- ldap - Lightweight Directory Access Protocol lookups
- file - resources available on the local computer or over a local file sharing network
- news - Usenet newsgroups
- gopher - the Gopher protocol
- telnet - the TELNET protocol
- data - the scheme for inserting small pieces of content in place
Generic URL syntax
All URLs, regardless of scheme, must conform to a generic syntax. Each scheme can impart its own requirements for the syntax of the scheme-specific part, but the URL must still conform to the generic syntax.
Using a limited subset of characters compatible with the printable subset of the ASCII repertoire, the generic syntax allows a URL to represent a resource's address, regardless of the original format of the components of the address.
Schemes using typical connection-based protocols use a common "generic URI" syntax, defined below:
scheme://authority/path?query#fragmentThe authority typically consists of the name or IP address of a server, optionally followed by a colon and a TCP port number. It may also contain a username and password for authenticating to the server.
The path is a specification of a location in some hierarchical structure, using a slash ("/") as delimiter between components.
The query typically expresses parameters of a dynamic query to some database, program, or script residing on the server.
The fragment identifies a portion of a resource, often a location in a document.
There is no universally accepted limit to the length of URLs. Microsoft's popular web browser, Internet Explorer, restricts the length of inputted URLs to just over 2000 characters.[Maximum URL length is 2,083 characters in Internet Explorer]
Example: HTTP URLs
The URLs employed by HTTP, the protocol used to transmit web pages, are the most popular kind of URI and can be used as an example to scheme://host:port/path?parameter=value#anchor
http://www.wikipedia.org
URI references
The term URI reference means a particular instance of a URI, or portion thereof, as used in, for instance, an HTML document, in order to refer to a particular resource. A URI reference often looks just like a URL or the tail end of a URL. URI references introduce two new concepts: the distinction between absolute and relative references, and the concept of a fragment identifier.
An absolute URL is a URI reference that is just like a URL defined above; it starts with a scheme followed by a colon and then a scheme-specific part. A relative URL is a URI reference that comprises just the scheme-specific part of a URL, or some trailing component thereof. The scheme and leading components are inferred from the context in which the URL reference appears: the base URI (or base URL) of the document containing the reference (its namespace).
A URI reference can also be followed by a hash sign ("#") and a fragment, i.e. a pointer to within the resource referenced by the URI as a whole. This fragment is not a part of the URI as such, but is intended for the "user agent" (browser) to interpret after a representation of the resource has been retrieved. Therefore, it is not supposed to be sent to the server in HTTP requests.
Examples of absolute URLs:
http://en.wikipedia.org/w/wiki.phtml?title=Train&action=history http://en.wikipedia.org/wiki/Train#Freight_trains
//nl.wikipedia.org/wiki/Train /wiki/Train Train#Passenger_trains
Case-sensitivity
According to the current standard, the scheme and host components are case-insensitive, and when normalized during processing, should be lowercase. Other components should be assumed to be case-sensitive. However, in practice case-sensitivity of the components other than the protocol and hostname are up to the webserver and operating system of the system hosting the website.
URLs in everyday use
An HTTP URL combines into one simple address the four basic items of information necessary to retrieve a resource from anywhere on the Internet:
- the protocol to use to communicate,
- the host (server) to communicate with,
- the network port on the server to connect to,
- the path to the resource on the server (for example, its file name).
http://en.wikipedia.org:80/wiki/Special:Search?search=train&go=GoIn the example above:
- http is the protocol,
- en.wikipedia.org is the host,
- 80 is the network port number on the server (as 80 is the default value for the HTTP protocol, this portion could have been omitted entirely),
- /wiki/Special:Search is the resource path,
- ?search=train&go=Go is the query string; this part is optional.
Since the HTTP protocol allows a server to respond to a request by redirecting the web browser to a different URL, many servers additionally allow users to omit certain parts of the URL, such as the "www." part, or the trailing slash if the resource in question is a directory. (Note: Omitting 'www.' is a feature of the DNS redirection, which may be performed at a top-level server and not on the HTTP server - but this distinction is transparent to an end-user). However, these omissions technically make it a different URL, so the web browser cannot make these adjustments, and has to rely on the server to respond with a redirect. It is possible, but due to tradition rare, for a web server to serve two different pages for URLs that differ only in a trailing slash.
Note that in en.wikipedia.org/wiki/Train, the hierarchical order of the five elements is org (generic top-level domain) - wikipedia (second-level domain) - en (subdomain) - wiki - Train; i.e. before the first slash from right to left, then the rest from left to right.
For a more extensive discussion of HTTP URLs and their use, .
The big picture
The term URL is also used outside the context of the World Wide Web. Database servers specify URLs as a parameter to make connections to it. Similarly any client-server application following a particular protocol may specify a URL format as part of its communication process.
Example of a database URL :
jdbc:datadirect:oracle://myserver:1521;sid=testdbIf a webpage is uniquely and more or less permanently defined by a URL it can be linked to (see also permalink, deep linking). This is not always the case, e.g. a menu option may change the contents of a frame within the page, without this new combination having its own URL. A webpage may also depend on temporarily stored information. If the webpage or frame has its own URL, this is not always obvious for someone who wants to link to it: the URL of a frame is not shown in the address bar of the browser, and a page without address bar may have been produced. The URL may be derivable from the source code and/or "properties" of various components of the page. See also Webpage#URL.
Apart from the purpose of linking to a page or page component, one may want to know the URL to show the component alone, and/or to lift restrictions such as a browser window without toolbars, and/or of a small non-adjustable size.
Web servers also have the ability to redirect URLs if the destination has changed, allowing sites to change their structure without affecting existing links. This process is known as URL redirection.
See also
- Extensible Resource Identifier (XRI)
- History of the Internet
- Internationalized Resource Identifier (IRI)
- Percent-encoding
- Uniform Resource Identifier (URI)
- URL normalization
- Website
References
External links
- RFC 3986 / STD 66 (2005) – the current generic URI syntax specification
- RFC 2396 (1998) and RFC 2732 (1999) – obsolete, but widely implemented, version of the generic URI syntax
- RFC 1808 (1995) – obsolete companion to
RFC 1738 covering relative URL processing - RFC 1738 (1994) – mostly obsolete definition of URL schemes and generic URI syntax
- RFC 1630 (1994) – the first generic URI syntax specification; first acknowledgment of URLs in an Internet standard
- [URI Working Group] – coordination center for development of URI standards
- [Architecture of the World Wide Web, Volume One, ยง2: Identification] – by W3C
- The IANA's official [list of registered URI schemes]
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
