What is URI Uniform resource identifier
URI: The Versatile Identifier for Web Resources
A Uniform Resource Identifier (URI), formerly known as Universal Resource Identifier, serves as the foundation for accessing resources on the internet and beyond. It acts as a unique string of characters that identifies an abstract or physical resource. Let's delve into the technical details of URIs:
Structure of a URI:
A URI typically comprises three main components:
- Scheme: The scheme defines the protocol used to access the resource. Common examples include:
http
: Hypertext Transfer Protocol (used for web pages)https
: Secure Hypertext Transfer Protocol (encrypted version of http)ftp
: File Transfer Protocol (used for file transfers)mailto
: Email addressfile
: Local files on a computer
- Path: The path specifies the location of the resource relative to the root of the identified server. For web pages, it typically represents the directory structure leading to the specific document.
Authority (Optional): This part specifies the location of the resource within a specific protocol. It can include elements like username, password, hostname, and port number. Here's an example breakdown:
username:password@hostname:port
Not all URIs require an authority component. For instance, a simple file path might not include it.
Here's an example URI that combines all components:
https://en.wikipedia.org/wiki/Main_Page
- Scheme:
https
- Authority:
en.wikipedia.org
- Path:
/wiki/Main_Page
Types of URIs:
URIs can be further categorized into two main types:
- Uniform Resource Locators (URLs): The most common type, URLs specify the exact location and access method for a resource. They provide enough information to retrieve the resource using the designated protocol.
- Uniform Resource Names (URNs): URNs identify a resource by its name within a specific namespace, independent of its location or access method. For example, an ISBN number (International Standard Book Number) can be a URN for a specific book. URNs are typically used for persistent identification and are not directly usable to access the resource.
Benefits of URIs:
- Standardization: URIs provide a standardized way to identify resources across different platforms and applications.
- Flexibility: The ability to represent various resource types and protocols with a single syntax makes URIs highly versatile.
- Extensibility: The introduction of new schemes allows URIs to adapt to future technologies and resource types.
Additional Points:
- URIs are case-sensitive. For instance,
http://www.example.com
is different fromHTTP://www.Example.com
. - Some characters within a URI require special encoding (e.g., spaces encoded as
%20
). - URIs play a crucial role in various internet technologies like web browsing, resource linking, and content addressing.
By understanding the technical details of URIs, you gain a deeper appreciation for the foundation upon which web communication and resource identification are built. They serve as the essential building blocks for navigating and accessing the vast information landscape of the internet.