Skip to main content

URIs

Definition

  • URI stands for Uniform Resource Indicator.
  • A URI is a string of characters that uniquely identifies a particular resource. It is a broader term that encompasses both Uniform Resource Locators (URLs) and Uniform Resource Names (URNs).
  • URIs are used to identify and locate resources on the internet or other networks. They provide a standard way of naming resources to ensure uniqueness.

URL

  • URL stands for Uniform Resource Locator.
  • A URL is a specific type of URI that provides the means to locate and retrieve a resource on the internet. URLs specify the protocol used to access the resource (e.g., HTTP, HTTPS), the location (domain or IP address), and the path to the resource.
  • In simpler terms, all URLs are URIs, but not all URIs are URLs. URLs are a subset of URIs that specifically deal with resource location.

URN

  • URN stands for Uniform Resource Name.

  • It is used to uniquely identify resources by name in a particular namespace.

  • Unlike Uniform Resource Locators (URLs), which provide the means to locate and retrieve a resource, URNs are intended to serve as persistent and globally unique identifiers for resources, irrespective of their current location.

  • URNs are part of the broader URI standard, which provides a framework for identifying and accessing resources on the internet.

  • Key characteristics:

    1. Global Uniqueness: URNs are designed to be globally unique, meaning that no two URNs should be the same. This uniqueness is intended to persist over time and across different naming authorities.

    2. Persistence: URNs are meant to be persistent identifiers, providing a stable reference to a resource even if the resource is moved or its location changes.

  • Example: An example of a URN is the ISBN (International Standard Book Number) for books. The ISBN uniquely identifies a book, and even if the book is moved to a different library or bookstore, the ISBN remains the same.

Example

A Uniform Resource Identifier (URI) is a string of characters that uniquely identifies a particular resource. Here is an example of a URI:

https://www.example.com/path/to/resource?query=value#fragment
  • Scheme: https is the scheme, indicating the protocol used to access the resource.
  • Authority: www.example.com is the authority or domain name of the resource.
  • Path: /path/to/resource is the path to the specific resource on the server.
  • Query: query=value is the query string, providing additional parameters for the resource.
  • Fragment: fragment is the fragment identifier, pointing to a specific section within the resource. This URI represents a URL, as it specifies both the location and the access protocol for a resource on the internet. URIs can also be used in other contexts, such as identifying resources on a local file system or within an application.