URI
A Uniform Resource Identifier (URI) is a compact string of characters that uniquely identifies a resource, which can be a physical object, a webpage, or an abstract concept. It is a superset that includes both Uniform Resource Locators (URLs), which specify a resource's location and how to access it (like https://www.example.com), and Uniform Resource Names (URNs), which provide a persistent name without indicating location (like urn:isbn:978-3-16-148410-0). URIs are fundamental to web navigation, as they provide a standard way for browsers to find and access content.
Key characteristics and types
Identification: The primary purpose of a URI is to identify a resource, either by its name, its location, or both.
Components: A URI is often made up of components, including a scheme (such as http, mailto, or file) and a scheme-specific part.
URLs: A URL is a specific type of URI that not only identifies a resource but also tells you how to access it, including the protocol and its location. For example, https://www.example.com/page.html is a URL and therefore also a URI.
URNs: A URN is another type of URI that identifies a resource by a unique name, but it does not specify the location. For example, urn:isbn:978-3-16-148410-0 is a URN for a specific book, identifying it by its ISBN without telling you where to find a physical copy.
Other schemes: Beyond URLs, there are many other URI types, such as mailto:info@example.com for an email address, or path/to/file for a local file.