Uniform Resource Identifier: Difference between revisions

Content deleted Content added
Gardimuer (talk | contribs)
Syntax: wide image template for syntax diagram
Citation bot (talk | contribs)
Removed URL that duplicated identifier. Removed access-date with no URL. Removed parameters. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox | #UCB_webform_linked 780/967
 
(25 intermediate revisions by 21 users not shown)
Line 2:
{{Redirect|URI}}
{{Distinguish|URL}}
{{More footnotesrefimprove|date=FebruaryAugust 20242025}}
{{Infobox technology standard
| title = Uniform Resource Identifier
Line 19:
| website = https://datatracker.ietf.org/doc/html/rfc3986#section-1.1
}}
A '''Uniform Resource Identifier''' ('''<code>URI'''</code>), formerly '''Universal Resource Identifier''', is a unique sequence of characters that identifies an abstract or physical resource,{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|p=1|ps=, "Abstract"}} such as resources on a webpage, mail address, phone number,{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|p=7|ps=; "1.1.2. Examples", "1.1.3. URI, URL, and URN"}} books, real-world objects such as people and places, concepts.{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|p=5|ps=, "Resource: the term "resource" is used in a general sense for whatever might be identified by a URI"}} URIs are used to identify anything described using the [[Resource Description Framework]] (RDF), for example, concepts that are part of an [[Ontology (information science)|ontology]] defined using the [[Web Ontology Language]] (OWL), and people who are described using the [[FOAF (ontology)|Friend of a Friend vocabulary]] would each have an individual URI.
 
URIs which provide a means of locating and [[Information retrieval|retrieving]] information resources on a network (either on the Internet or on another private network, such as a computer filesystem or an [[Intranet]]) are [[Uniform Resource Locator]]s ('''URLs'''). Therefore, URLs are a subset of URIs, iei.e. every URL is a URI (and not necessarily the other way around).{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|p=7|ps=; "1.1.2. Examples", "1.1.3. URI, URL, and URN"}} Other URIs provide only a unique name, without a means of locating or retrieving the resource or information about it; these are [[Uniform Resource Name]]s (URNs). The web technologies that use URIs are not limited to [[Web browser|web browsers]].
 
== History ==
Line 27:
=== Conception ===
 
URIs and URLs have a shared history. In 1990, [[Tim Berners-Lee|Tim Berners-Lee's]] proposals for [[hypertext]] implicitly introduced the idea of a URL as a short string representing a resource that is the target of a [[hyperlink]].<ref>{{cite web |last1=Palmer |first1=Sean |title=The Early History of HTML |url=http://infomesh.net/html/history/early/ |website=infomesh.net |access-date=6 December 2020}}</ref> At the time, people referred to it as a "hypertext name"<ref>{{cite web |title=W3 Naming Schemes |url=https://www.w3.org/History/19921103-hypertext/hypertext/WWW/Addressing/Addressing.html |website=www.w3.orgW3C |date= 24 February 1992 |access-date=6 December 2020}}</ref> or "document name".
 
Over the next three and a half years, as the [[World Wide Web|World Wide Web's]] core technologies of [[HTML]], [[HTTP]], and [[Web browser|web browsers]] developed, a need to distinguish a string that provided an address for a resource from a string that merely named a resource emerged. Although not yet formally defined, the term ''Uniform Resource Locator'' came to represent the former, and the more contentious ''Uniform Resource Name'' came to represent the latter. In July 1992 Berners-Lee's report on the [[Internet Engineering Task Force]] (IETF) "UDI (Universal Document Identifiers) [[Birds of a feather (computing)|BOF]]" mentions URLs (as Uniform Resource Locators), URNs (originally, as Unique Resource Numbers), and the need to charter a new working group.<ref>{{cite web |title=Proceedings of the Twenty-Fourth Internet Engineering Task Force |page=193 |url=https://www.ietf.org/proceedings/24.pdf |publisher=Corporation for National Research Initiatives |date=July 1992 |website=IETF|access-date=27 July 2021}}</ref> In November 1992 the IETF "URI Working Group" met for the first time.<ref>{{cite web |title=Proceedings of the Twenty-Fifth Internet Engineering Task Force |page=501 |url=https://www.ietf.org/proceedings/25.pdf |publisher=Corporation for National Research Initiatives |date=November 1992 |website=IETF |access-date=27 July 2021}}</ref>
 
During the debate over defining URLs and URNs, it became evident that the concepts embodied by the two terms were merely aspects of the fundamental, overarching, notion of resource ''identification''. In June 1994, the IETF published Berners-Lee's first ''Request for Comments'' that acknowledged the existence of URLs and URNs. Most importantly, it defined a formal syntax for ''Universal Resource Identifiers'' (i.e. URL-like strings whose precise syntaxes and semantics depended on their schemes). In addition, the {{IETF RFC|1630}} attempted to summarize the syntaxes of URL schemes in use at the time. It acknowledged -- ''but did not standardize''—the existence of relative URLs and fragment identifiers.{{Ref RFC|1630}}
 
=== Refinement ===
Line 41:
In December 1999, {{IETF RFC|2732}}{{Ref RFC|2732}} provided a minor update to <nowiki>RFC 2396</nowiki>, allowing URIs to accommodate [[IPv6]] addresses. A number of shortcomings discovered in the two specifications led to a community effort, coordinated by <nowiki>RFC 2396</nowiki> co-author [[Roy Fielding]], that culminated in the publication of IETF {{IETF RFC|3986}}{{Ref RFC|3986}} in January 2005. While obsoleting the prior standard, it did not render the details of existing URL schemes obsolete; <nowiki>RFC 1738</nowiki> continues to govern such schemes except where otherwise superseded. IETF {{IETF RFC|2616}}{{Ref RFC|2616}} for example, refines the <code>http</code> scheme. Simultaneously, the IETF published the content of <nowiki>RFC 3986</nowiki> as the full standard STD 66, reflecting the establishment of the URI generic syntax as an official Internet protocol.
 
In 2001, the [[World Wide Web Consortium|World Wide Web Consortium's]] (W3C) Technical Architecture Group (TAG) published a guide to [[best practices]] and canonical URIs for publishing multiple versions of a given resource.<ref>{{cite web |last1=Raman |first1=T.V. |title=On Linking Alternative Representations To Enable Discovery And Publishing |url=https://www.w3.org/2001/tag/doc/alternatives-discovery.html |website=www.w3.orgW3C |access-date=6 December 2020 |date=1 November 2006}}</ref> For example, content might differ by language or by size to adjust for capacity or settings of the device used to access that content.
 
In August 2002, IETF {{IETF RFC|3305}}{{Ref RFC|3305}} pointed out that the term "URL" had, despite widespread public use, faded into near obsolescence, and serves only as a reminder that some URIs act as addresses by having schemes implying network accessibility, regardless of any such actual use. As URI-based standards such as [[Resource Description Framework]] make evident, resource identification need not suggest the retrieval of resource representations over the Internet, nor need they imply network-based resources at all.
 
The [[Semantic Web]] uses the HTTP URI scheme to identify both documents and concepts for practical uses, a distinction which has caused confusion as to how to distinguish the two. The ''TAG'' published an e-mail in 2005 with a solution of the problem, which became known as the ''httpRange-14 resolution''.<ref>{{cite web |last1=Fielding |first1=Roy |title=[httpRange-14] Resolved |url=https://lists.w3.org/Archives/Public/www-tag/2005Jun/0039.html |website=lists.w3.orgW3C Public mailing list archives |access-date=6 December 2020 |date=18 JunJune 2005}}</ref> The W3C subsequently published an Interest Group Note titled ''"Cool URIs for the Semantic Web''", which explained the use of [[content negotiation]] and the [[HTTP 303]] response code for redirections in more detail.<ref>{{cite web |editor-last1=Sauermann |editor-first1=Leo |editor-first2=Richard |editor-last2=Cyganiak |first1= Danny |last1=Ayers |first2=Max |last2=Völkel |title=Cool URIs for the Semantic Web |url=https://www.w3.org/TR/cooluris/ |website=www.w3.orgW3C |access-date=6 December 2020 |date=3 December 2008}}</ref>
 
== Design ==
Line 61:
As such, a URL is simply a URI that happens to point to a resource over a network.{{efn|A report published in 2002 by a joint W3C/IETF working group aimed to normalize the divergent views held within the IETF and W3C over the relationship between the various 'UR*' terms and standards. While not published as a full standard by either organization, it has become the basis for the above common understanding and has informed many standards since then.}}{{Ref RFC|3305}} However, in non-technical contexts and in software for the World Wide Web, the term "URL" remains widely used. Additionally, the term "web address" (which has no formal definition) often occurs in non-technical publications as a synonym for a URI that uses the ''http'' or ''https'' schemes. Such assumptions can lead to confusion, for example, in the case of XML namespaces that have a [[#Relation to XML namespaces|visual similarity to resolvable URIs]].
 
Specifications produced by the [[WHATWG]] prefer ''URL'' over ''URI'', and so newer HTML5 APIs use ''URL'' over ''URI''.<ref>{{cite web |title=URL Standard: 6.3. URL APIs elsewhere |url=https://url.spec.whatwg.org/#url-apis-elsewhere |date= 12 May 2025 |website=URL Standard }}</ref> {{cquote|Standardize on the term URL. URI and IRI [Internationalized Resource Identifier] are just confusing. In practice a single algorithm is used for both so keeping them distinct is not helping anyone. URL also easily wins the search result popularity contest.<ref>{{cite web |title=URL Standard: Goals |url=https://url.spec.whatwg.org/#goals}}</ref>}}
 
While most URI schemes were originally designed to be used with a particular [[protocol (computing)|protocol]], and often have the same name, they are semantically different from protocols. For example, the scheme ''http'' is generally used for interacting with [[web resource]]s using HTTP, but the scheme ''[[file URI scheme|file]]'' has no protocol.
Line 69:
A URI has a scheme that refers to a specification for assigning identifiers within that scheme. As such, the URI syntax is a federated and extensible naming system wherein each scheme's specification may further restrict the syntax and semantics of identifiers using that scheme. The URI generic syntax is a superset of the syntax of all URI schemes. It was first defined in {{IETF RFC|2396}}, published in August 1998,{{Ref RFC|2396}} and finalized in {{IETF RFC|3986}}, published in January 2005.{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|p=46|ps=; "9. Acknowledgements"}}
 
A URI is composed from an allowed set of [[ASCII]] characters consisting of [[Filename|reserved characters]] (gen-delims: <code>:</code>, <code>/</code>, <code>?</code>, <code>#</code>, <code>[</code>, <code>]</code>, and <code>@</code>; sub-delims: <code>!</code>, <code>$</code>, <code>&</code>, <code>'</code>, <code>(</code>, <code>)</code>, <code>*</code>, <code>+</code>, <code>,</code>, <code>;</code>, and <code>=</code>),{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|ps=; "2.2. Reserved Characters", "2.3. Unreserved Characters"|pp=13-1413–14}} unreserved characters ([[Latin-script alphabet|uppercase and lowercase letters]], [[Arabic numerals|decimal digits]], <code>-</code>, <code>.</code>, <code>_</code>, and <code>~</code>),{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|ps=; "2.2. Reserved Characters", "2.3. Unreserved Characters"|pp=13-1413–14}} and the character <code>%</code>.{{Sfn|Berners-Lee, Tim; Fielding, Roy T.; Masinter, Larry|2005|ps=; "2.1. Percent-Encoding"|pp=12}} Syntax components and subcomponents are separated by ''delimiters'' from the reserved characters (only from generic reserved characters for components) and define ''identifying data'' represented as unreserved characters, reserved characters that do not act as delimiters in the component and subcomponent respectively,{{Ref RFC|3986|rsection=2}} and [[percent-encoding]]s when the corresponding character is outside the allowed set or is being used as a delimiter of, or within, the component. A percent-encoding of an identifying data [[Octet (computing)|octet]] is a sequence of three characters, consisting of the character <code>%</code> followed by the two hexadecimal digits representing that octet's numeric value.{{Ref RFC|3986|rsection=2.1}}
 
<section begin="syntax"/><!-- This section is transcluded in other articles. See Help:Labeled section transclusion -->The URI generic syntax consists of five ''components'' organized hierarchically in order of decreasing significance from left to right:{{Ref RFC|3986|rsection=3}}
Line 87:
This is represented in a [[syntax diagram]] as:
 
<div class="skin-invert-image">{{wide image|URI syntax diagram.svg|900px|alt=URI syntax diagram}}</div>
 
The URI comprises:
Line 256:
 
=== Works cited ===
* {{cite IETF|last=[[Tim Berners-Lee|Berners-Lee, Tim]]; [[Roy Fielding|Fielding, Roy T.]]; [[Larry Masinter|Masinter, Larry]] |rfc=3986 |title=RFC 3986 Uniform Resource Identifier (URI): Generic Syntax |date=January 2005 |publisher=Internet Engineering Task Force |language=en |access-date=16 February 2024-02-16 }}
 
* {{cite web |url=http://www.w3.org/TR/REC-xml-names/#iri-use |title=Namespaces in XML 1.1 (Second Edition) |date=16 August 2006 |at=2.2 Use of URIs as Namespace Names |editor-first1=Tim |editor-last1=Bray |editor-link1=Tim Bray |editor-first2=Dave |editor-last2=Hollander |editor-first3=Andrew |editor-last3=Layman |editor-first4=Richard |editor-last4=Tobin |publisher=[[World Wide Web Consortium]] |access-date=31 August 2015 |ref={{SfnRef|W3C|2006}}}}
* {{cite IETF|last=[[Tim Berners-Lee|Berners-Lee, Tim]]; [[Roy Fielding|Fielding, Roy T.]]; [[Larry Masinter|Masinter, Larry]] |rfc=3986 |title=RFC 3986 Uniform Resource Identifier (URI): Generic Syntax |date=January 2005 |publisher=Internet Engineering Task Force |language=en |access-date=2024-02-16 }}
* {{cite web |url=http://www.w3.org/TR/REC-xml-names/#iri-use |title=Namespaces in XML 1.0 (Third Edition) |date=8 December 2009 |at=2.2 Use of URIs as Namespace Names |editor-first1=Tim |editor-last1=Bray |editor-link1=Tim Bray |editor-first2=Dave |editor-last2=Hollander |editor-first3=Andrew |editor-last3=Layman |editor-first4=Richard |editor-last4=Tobin |editor-first5=Henry S. |editor-last5=Thompson |publisher=[[World Wide Web Consortium]] |access-date=31 August 2015 |ref={{SfnRef|W3C|2009}}}}
* {{cite book |author-first=Elliotte Rusty |author-last=Harold |author-link=Elliotte Rusty Harold |date=2004 |title=XML 1.1 Bible |edition=Third |publisher=[[Wiley Publishing]] |page=291 |isbn=978-0-7645-4986-1}}
* {{cite web |author-last1=Lawrence |author-first1=Eric |title=Browser Arcana: IP Literals in URLs |url=http://blogs.msdn.com/b/ieinternals/archive/2014/03/06/browser-arcana-ipv4-ipv6-literal-urls-dotted-va-dotless.aspx |website=IEInternals |publisher=[[Microsoft]] |date=6 March 2014 |access-date=2016-04-25 April 2016}}
* {{cite book |author-last=Morrison |author-first=Michael Wayne |author-link=Michael Wayne Morrison |date=2006 |title=Sams Teach Yourself XML |publisher=[[Sams Publishing]] |chapter=Hour 5: ''Putting Namespaces to Use'' |page=91}}
* {{cite journal|journal=[[IEEE Internet Computing]]|year=1998|doi= 10.1109/4236.722228|issn=1941-0131|volume=2|issue=5|title=WebDAV: IEFT standard for collaborative authoring on the Web|first=E.J|last=Whitehead|pages=34–40 |url=https://ieeexplore.ieee.org/document/722228|access-date=12 October 2021}}
 
== Further reading ==
 
{{refbegin|32em}}
 
* {{cite book |author-first=Elliotte Rusty |author-last=Harold |author-link=Elliotte Rusty Harold |date=2004 |title=XML 1.1 Bible |edition=Third |publisher=[[Wiley Publishing]] |page=291 |isbn=978-0-7645-4986-1}}
* {{cite web |author=((URI Planning Interest Group, W3C/IETF)) |title=URIs, URLs, and URNs: Clarifications and Recommendations 1.0 |url=http://www.w3.org/TR/uri-clarification/ |date=21 September 2001 |access-date=2009-07-27 July 2009 |ref={{SfnRef|URI Planning Interest Group|2009}}}}
* {{cite IETF|rfc=7595 |title=Guidelines and Registration Procedures for URI Schemes |editor-first=Dave |editor-last=Thaler |author-first1=Tony |author-last1=Hansen |author-first2=Ted |author-last2=Hardie |journal=IETF Request for Comments (RFC) Pages - Test |publisher=[[Internet Engineering Task Force]] |date=June 2015 |issn=2070-1721 |ref={{SfnRef|IETF|2015}}}}
* {{cite web |url=http://www.w3.org/2001/tag/doc/alternatives-discovery.html |title=On Linking Alternative Representations To Enable Discovery And Publishing |publisher=[[World Wide Web Consortium]] |date=2006 |orig-year=2001 |access-date=3 April 2012-04-03 |ref={{SfnRef|W3C|2001}}}}
* {{cite book |author-last=Morrison |author-first=Michael Wayne |author-link=Michael Wayne Morrison |date=2006 |title=Sams Teach Yourself XML |publisher=[[Sams Publishing]] |chapter=Hour 5: ''Putting Namespaces to Use'' |page=91}}
* {{cite web |author=((URI Planning Interest Group, W3C/IETF)) |title=URIs, URLs, and URNs: Clarifications and Recommendations 1.0 |url=http://www.w3.org/TR/uri-clarification/ |date=21 September 2001 |access-date=2009-07-27 |ref={{SfnRef|URI Planning Interest Group|2009}}}}
* {{cite web |url=http://www.w3.org/2001/tag/doc/alternatives-discovery.html |title=On Linking Alternative Representations To Enable Discovery And Publishing |publisher=[[World Wide Web Consortium]] |date=2006 |orig-year=2001 |access-date=2012-04-03 |ref={{SfnRef|W3C|2001}}}}
* {{cite web |url=http://www.w3.org/TR/REC-xml-names/#iri-use |title=Namespaces in XML 1.1 (Second Edition) |date=16 August 2006 |at=2.2 Use of URIs as Namespace Names |editor-first1=Tim |editor-last1=Bray |editor-link1=Tim Bray |editor-first2=Dave |editor-last2=Hollander |editor-first3=Andrew |editor-last3=Layman |editor-first4=Richard |editor-last4=Tobin |publisher=[[World Wide Web Consortium]] |access-date=31 August 2015 |ref={{SfnRef|W3C|2006}}}}
* {{cite web |url=http://www.w3.org/TR/cooluris/ |title=Cool URIs for the Semantic Web |editor-first1=Leo |editor-last1=Sauermann |editor-first2=Richard |editor-last2=Cyganiak |author-first1=Danny |author-last1=Ayers |author-first2=Max |author-last2=Völkel |publisher=[[World Wide Web Consortium]] |date=3 December 2008 |access-date=2012-04-03 |ref={{SfnRef|W3C|2008}}}}
* {{cite web |url=http://www.w3.org/TR/REC-xml-names/#iri-use |title=Namespaces in XML 1.0 (Third Edition) |date=8 December 2009 |at=2.2 Use of URIs as Namespace Names |editor-first1=Tim |editor-last1=Bray |editor-link1=Tim Bray |editor-first2=Dave |editor-last2=Hollander |editor-first3=Andrew |editor-last3=Layman |editor-first4=Richard |editor-last4=Tobin |editor-first5=Henry S. |editor-last5=Thompson |publisher=[[World Wide Web Consortium]] |access-date=31 August 2015 |ref={{SfnRef|W3C|2009}}}}
* {{cite IETF|rfc=1866|section=8.2.1 |title=Hypertext Markup Language – 2.0 |author-first1=Tim |author-last1=Berners-Lee |author-link1=Tim Berners-Lee |author-first2=Daniel "Dan" |author-last2=Connolly |author-link2=Daniel Connolly (computer scientist) |publisher=[[Internet Engineering Task Force]] |date=November 1995 |s2cid=6628570 |access-date=13 September 2015 |ref={{SfnRef|RFC 1866|1995}} }}
* {{cite IETF |title=Uniform Resource Identifiers (URI): Generic Syntax |rfc=2396 |author-first1=Tim |author-last1=Berners-Lee |author-link1=Tim Berners-Lee |author-first2=Roy T. |author-last2=Fielding |author-link2=Roy T. Fielding |author-first3=Larry |author-last3=Masinter |author-link3=Larry Masinter |publisher=[[Internet Engineering Task Force]] |date=August 1998 |access-date=31 August 2015 |ref={{SfnRef|RFC 2396|1998}}}}
* {{cite IETF |title=Uniform Resource Identifiers (URI): Generic Syntax |rfc=3986 |author-first1=Tim |author-last1=Berners-Lee |author-link1=Tim Berners-Lee |author-first2=Roy T. |author-last2=Fielding |author-link2=Roy T. Fielding |author-first3=Larry |author-last3=Masinter |author-link3=Larry Masinter |publisher=[[Internet Engineering Task Force]] |date=January 2005 |access-date=31 August 2015 |ref={{SfnRef|RFC 3986|2005}}}}
* {{cite IETF |rfc=3986|section=3 |title=Uniform Resource Identifiers (URI): Generic Syntax|sectionname=Syntax Components |author-first1=Tim |author-last1=Berners-Lee |author-link1=Tim Berners-Lee |author-first2=Roy T. |author-last2=Fielding |author-link2=Roy T. Fielding |author-first3=Larry |author-last3=Masinter |author-link3=Larry Masinter |publisher=[[Internet Engineering Task Force]] |date=January 2005 |access-date=31 August 2015 |ref={{SfnRef|RFC 3986, section 3|2005}}}}
* {{cite web |author-last1=Lawrence |author-first1=Eric |title=Browser Arcana: IP Literals in URLs |url=http://blogs.msdn.com/b/ieinternals/archive/2014/03/06/browser-arcana-ipv4-ipv6-literal-urls-dotted-va-dotless.aspx |website=IEInternals |publisher=[[Microsoft]] |date=6 March 2014 |access-date=2016-04-25}}
{{refend}}
* {{cite journal|journal=[[IEEE Internet Computing]]|year=1998|doi= 10.1109/4236.722228|issn=1941-0131|volume=2|issue=5|title=WebDAV: IEFT standard for collaborative authoring on the Web|first=E.J|last=Whitehead|pages=34–40 |url=https://ieeexplore.ieee.org/document/722228|access-date=12 October 2021}}
 
==External links==