URL: Difference between revisions
m Reverted edits by 65.242.33.194 (talk) to last revision by Epbr123 (HG) |
JeffClarkis (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{cleanup|date=December 2010}} |
{{cleanup|date=December 2010}} |
||
[[File:URI Venn Diagram.svg|thumb|The relationship of URL to [[Uniform Resource Identifier|URI]] and [[Uniform Resource Name|URN]]]] |
[[File:URI Venn Diagram.svg|thumb|The relationship of URL to [[Uniform Resource Identifier|URI]] and [[Uniform Resource Name|URN]]]] |
||
In [[Information technology|computing]], a '''Uniform Resource Locator''' ('''URL''') is a [[Uniform Resource Identifier]] (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In popular usage and in many technical documents and verbal discussions it is often incorrectly used as a [[synonym]] for URI.<ref>RFC 3305 "URI Partitioning: There is some confusion in the web community over the partitioning of URI space, specifically, the relationship among the concepts of URL, URN, and URI. The confusion owes to the incompatibility between two different views of URI partitioning, which we call the 'classical' and 'contemporary' views."</ref> |
In [[Information technology|computing]], a '''Uniform Resource Locator''' ('''URL''') is a [[Uniform Resource Identifier]] (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In popular usage and in many technical documents and verbal discussions it is often incorrectly used as a [[synonym]] for URI.<ref>RFC 3305 "URI Partitioning: There is some confusion in the web community over the partitioning of URI space, specifically, the relationship among the concepts of URL, URN, and URI. The confusion owes to the incompatibility between two different views of URI partitioning, which we call the 'classical' and 'contemporary' views."</ref> URLRURLRULRURLURLURLRUR ypinmg motive |
||
The best-known example of the use of URLs is for the ''addresses'' of web pages on the [[World Wide Web]], such as <code><nowiki>http://www.example.com/</nowiki></code>. |
The best-known example of the use of URLs is for the ''addresses'' of web pages on the [[World Wide Web]], such as <code><nowiki>http://www.example.com/</nowiki></code>. |
||
Revision as of 18:32, 1 March 2011
In computing, a Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In popular usage and in many technical documents and verbal discussions it is often incorrectly used as a synonym for URI.[1] URLRURLRULRURLURLURLRUR ypinmg motive
The best-known example of the use of URLs is for the addresses of web pages on the World Wide Web, such as http://www.example.com/
.
History
The Uniform Resource Locator was created in 1994[2] by Tim Berners-Lee and the URI working group of the Internet Engineering Task Force.[3] The format is based on Unix file path syntax, where forward slashes are used to separate directory or folder and file or resource names. Conventions already existed where server names could be prepended to complete file paths, preceded by a double-slash (//).[4]
File formats may also be specified using a final dot suffix, so that requests for file.html
or file.txt
may be served directly whereas file.php
needs to be sent to a PHP pre-processor before the processed result is served to the end user. The exposure of such implementation-specific details in public URLs is becoming less common;[5] the necessary information can be better specified and exchanged using Internet media type identifiers, previously known as MIME types.
Berners-Lee later regretted the use of dots to separate the parts of the domain name within URIs, wishing he had used slashes throughout.[4] For example, http://www.example.com/path/to/name would have been written http:com/example/www/path/to/name. Berners-Lee has also said that, given the colon following the URI scheme, the two forward slashes before the domain name were also unnecessary.[6]
Syntax
Every URL consists of some of the following: the scheme name (commonly called protocol), followed by a colon, then, depending on scheme, a domain name (alternatively, IP address), a port number, the path of the resource to be fetched or the program to be run, then, for programs such as Common Gateway Interface (CGI) scripts, a query string,[7][8] and an optional fragment identifier.[9]
The syntax is
scheme://domain:port/path?query_string#fragment_id
- The scheme name defines the namespace, purpose, and the syntax of the remaining part of the URL. Software will try to process a URL according to its scheme and context. For example, a web browser will usually dereference the URL http://example.org:80 by performing an HTTP request to the host at example.org, using port number 80. The URL mailto:bob@example.com may start an e-mail composer with the address bob@example.com in the To field.
Other examples of scheme names include https:, gopher:, wais:, ftp:. URLs with https as a scheme (such as https://example.com/) require that requests and responses will be made over a secure connection to the website. Some schemes that require authentication allow a username, and perhaps a password too, to be embedded in the URL, for example ftp://asmith@ftp.example.org. Passwords embedded in this way are not conducive to secure working, but the full possible syntax is
scheme://username:password@domain:port/path?query_string#fragment_id
- The domain name or IP address gives the destination location for the URL. The domain google.com, or its IP address 72.14.207.99, is the address of Google's website.
- The domain name portion of a URL is not case sensitive since DNS ignores case: http://en.example.org/ and HTTP://EN.EXAMPLE.ORG/ both open the same page.
- The port number is optional; if omitted, the default for the scheme is used. For example, http://vnc.example.com:5800 connects to port 5800 of vnc.example.com, which may be appropriate for a VNC remote control session. If the port number is omitted for an http: URL, the browser will connect on port 80, the default HTTP port. The default port for an https: request is 443.
- The path is used to specify and perhaps find the resource requested. It is case-sensitive, though it may be treated as case-insensitive by some servers, especially those based on Microsoft Windows. If the server is case sensitive and http://en.example.org/wiki/URL is correct, http://en.example.org/WIKI/URL/ or http://en.example.org/wiki/url/ will display an HTTP 404 error page, unless these URLs point to valid resources themselves.
- The query string contains data to be passed to software running on the server. It may contain name/value pairs separated by ampersands, for example ?first_name=John&last_name=Doe.
- The fragment identifier, if present, specifies a part or a position within the overall resource or document. When used with HTTP, it usually specifies a section or location within the page, and the browser may scroll to display that part of the page.
Absolute vs relative URLs
According to RFC 1738, which defined URLs in 1994, when resources contain references to other resources, they can use relative links to define the location of the second resource as if to say, "in the same place as this one except with the following relative path". It went on to say that such relative URLs are dependent on the original URL containing a hierarchical structure against which the relative link is based, and that the ftp
, http
, and file
URL schemes are examples of some that can be considered hierarchical, with the components of the hierarchy being separated by "/".[10]
URLs as locators
A URL is a URI that, "in addition to identifying a resource, provides a means of locating the resource by describing its primary access mechanism (e.g., its network location)".[11][12]
Internet hostnames
On the Internet, a hostname is a domain name assigned to a host computer. This is usually a combination of the host's local name with its parent domain's name. For example, en.example.org consists of a local hostname (en) and the domain name example.org. The hostname is translated into an IP address via the local hosts file, or the Domain Name System (DNS) resolver. It is possible for a single host computer to have several hostnames; but generally the operating system of the host prefers to have one hostname that the host uses for itself.
Any domain name can also be a hostname, as long as the restrictions mentioned below are followed. For example, both "en.example.org" and "example.org" can be hostnames if they both have IP addresses assigned to them. The domain name "xyz.example.org" may not be a hostname if it does not have an IP address, but "aa.xyz.example.org" may still be a hostname. All hostnames are domain names, but not all domain names are hostnames.
See also
- CURIE (Compact URI)
- Extensible Resource Identifier (XRI)
- Internationalized Resource Identifier (IRI)
- Uniform Resource Identifier (URI)
- URL normalization
- URI scheme
References
- ^ RFC 3305 "URI Partitioning: There is some confusion in the web community over the partitioning of URI space, specifically, the relationship among the concepts of URL, URN, and URI. The confusion owes to the incompatibility between two different views of URI partitioning, which we call the 'classical' and 'contemporary' views."
- ^ Uniform Resource Locators (URL)
- ^ URL Specification
- ^ a b Berners-Lee, Tim. "Frequently asked questions by the press". Retrieved 2010-02-03.
- ^ Berners-Lee, Tim (1998). "Cool URIs don't change". W3C Style. W3C. Retrieved 5 October 2010.
- ^ "Technology | Berners-Lee 'sorry' for slashes". BBC News. 2009-10-14. Retrieved 2010-02-14.
- ^ RFC 1738
- ^ "PHP parse_url() Function". Retrieved 2009-03-12.
- ^ URL Syntax
- ^ Berners-Lee, Tim (1994). "Uniform Resource Locators (URL)". IETF. Retrieved 20 November 2010.
{{cite web}}
: Unknown parameter|coauthors=
ignored (|author=
suggested) (help); Unknown parameter|month=
ignored (help) - ^ Tim Berners-Lee, Roy T. Fielding, Larry Masinter. (January 2005). “Uniform Resource Identifier (URI): Generic Syntax”. Internet Society. RFC 3986; STD 66.
- ^ by describing its primary access mechanism