DEV Community

Panda Quests
Panda Quests

Posted on

URI vs. URL vs. URN

This post was first published on my blog:

You may have come across these terms before. And you may have used it interchangeably. But there are differences between them and if you are a professional software developer or working in the field of web development, it’s important to discern these terms.

An URI (Uniform Resource Identifier) identifies a resource on the Internet either by location, or by name, or both. There are two subsets of URIs: The URL (Uniform Resource Locator) and the URN (Uniform Resource Name).

The URL specifies where an identified resource is located and the mechanism for retrieving it. In case of an HTTP URL it is the HTTP protocol. But the machanism for retrieving the resource, doesn’t have to be HTTP URL, i.e. “http://”, an URL can also be “ftp://” (File Transfer Protocol for computer files) or “smb://” (Server Message Block for shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network).

The URN is part of a larger Internet information architecture and unambigously identifies a resource. Contrary to the URL it does not imply availability of the identified resource.

The URL is similar to a person’s address, as it defines somethings’s location, while the URN is similar to the ISBN of a book, as it unambigosly defines something’s identity. In other words: The URL answers the question Where something is while the URN answers the question Who something is.

Source(s) and for more information:
RFIC3986: http://www.ietf.org/rfc/rfc3986.txt
http://en.wikipedia.org/wiki/File_Transfer_Protocol
http://en.wikipedia.org/wiki/Server_Message_Block

Have you followed or subscribed to us, yet? We are publishing articles about JavaScript and software development in general multiple times a week. Make sure not to miss any of our great content.

More details about this and many other topics on my blog

Top comments (0)