A uniform resource identifier (URI) is a string that identifies a resource, whether it’s something abstract or something you can physically access. Think of it as a unique label that helps find various types of content on the internet, like webpages, documents, images, or databases.
There are two main types of URIs: URLs and URNs. URLs, or uniform resource locators, are the web addresses we use every day. They point to specific locations on the internet and tell your browser how to access these resources.
So, why do URIs matter? They help distinguish one internet resource from another, which is crucial when browsing online. When you type or click a link, the URI guides protocols that fetch the right resource—be it text, videos, or images—for you to view.
Take an example of a URI. If someone wants to access an e-book, they might see this:
http://www.techtarget.com/white-paper-ebook/educating-customers-on-genai-using-content-to-build-engagement-for-ai-enhanced-services/
.
This URI leads directly to a specific resource on a website.
Different types of URIs can shine in various situations. For instance, telnet://192.0.2.16:80
directs users to connect to a remote server, while mailto:[email protected]
opens an email client with a pre-filled address.
A file URI shows a file’s location on a local computer, like file://localhost/etc/fstab
in UNIX or file://localhost/c:/WINDOWS/clock.avi
in Windows. It follows a standard format, clearly defining where the file is stored.
Now, let’s look at how URIs operate. When you enter a URI, your browser parses it, breaking it down into components like the scheme, authority, and path. For example, if you access that TechTarget e-book, Chrome sends a request to the server associated with that URI, which then sends back the resource for you to read.
Breaking down the structure of a URI, you have the scheme—what protocol to use, like http://
—and the authority, which is usually the domain name. The path tells the server exactly where to find the resource within that domain. There are also optional components, like queries for extra data or fragments that pinpoint a specific part of a resource.
Tim Berners-Lee, who created the World Wide Web, first documented URIs in 1994. His goal was to establish a universal syntax for identifying various web resources, regardless of their format or access protocol. Today, this foundational concept is still relevant and outlined in documents like RFC 3986.
Understanding how URIs work involves knowing their resolution and references. Resolution helps fetch the right data identified by the URI. As for references, they can show either the entire URI or part of it, hinting at how the resource relates to the whole.
In summary, URIs come in three main types: URLs, URNs (uniform resource names) that uniquely identify a resource without telling you where to find it, and URCs (uniform resource characteristics) that provide metadata about a resource. While a URL directs you to a webpage, a URN can remain relevant even when the resource isn’t available anymore.
So, while URI and URL are often thrown around interchangeably, they’re not quite the same. A URI is a broad identifier for a resource, while a URL specifically tells you how to access that resource. Just like knowing someone’s name doesn’t tell you where they live, having a URI doesn’t mean you have the way to get to the actual resource without the URL.