A Uniform Resource Identifier (URI) is a string of characters that unambiguously identifies a particular resource. The term URI encompasses multiple types of identifiers, including Uniform Resource Locator (URL) and Uniform Resource Name (URN).
Types of URIs
URL (Uniform Resource Locator)
A URL is a subset of URI that provides not only the identity of the resource but also a means to locate it. For example:
https://www.example.com/index.html
It indicates a resource accessible via the HTTP protocol at www.example.com
.
URN (Uniform Resource Name)
A URN is another subset of URI that identifies a resource by name in a given namespace but does not provide location details. For example:
urn:isbn:0451450523
It uniquely identifies a book by its International Standard Book Number (ISBN).
Structure of a URI
A URI typically consists of the following components:
scheme:[//authority]path[?query][#fragment]
- Scheme: Indicates the protocol (e.g.,
http
,https
,ftp
). - Authority: (Optional) Contains a domain name or IP address and possibly a port.
- Path: Specifies the resource’s location within the host.
- Query: (Optional) Provides additional parameters for the resource.
- Fragment: (Optional) Points to a specific section within the resource.
Example:
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
Here, https
is the scheme, en.wikipedia.org
is the authority, and /wiki/Uniform_Resource_Identifier
is the path.
Historical Context
The concept of URI was first introduced by Tim Berners-Lee, the inventor of the World Wide Web, in the early 1990s. It was developed as a solution for identifying resources across the web uniformly. The standardization of URIs has greatly facilitated web development and accessibility.
Applicability and Uses
URIs are used extensively in web development, notably in:
- Web Browsers: To access web pages.
- APIs: To identify endpoints.
- Databases: To reference specific data entries.
- Digital Resources: To point to documents, images, and other files.
Comparison to Related Terms
- URL vs. URI: A URL is a type of URI that includes the means of locating the resource.
- URN vs. URI: A URN is also a type of URI but does not provide location information.
FAQs
What is the difference between a URL and a URI?
Can a URI be both a URL and a URN?
Why are URIs important?
References
- Tim Berners-Lee, “Uniform Resource Identifiers (URI): Generic Syntax,” RFC 3986.
- W3C, “Architecture of the World Wide Web, Volume One.”
Summary
A Uniform Resource Identifier (URI) is a fundamental component of the internet, providing a standardized way to identify resources. Encompassing URLs and URNs, URIs are integral to web development, permitting seamless interactions with web resources. Understanding URIs is essential for anyone involved in building or navigating the digital landscape.