The humble hyperlink is one of the most powerful aspects of the Web. This ability to connect to any resource on the Web through a URL is what makes the everywhere web possible. As developers, we should aim to expose URLs that are stable and easy to understand for our users.
In 1996 the creator of the Web, Tim Berners-Lee, drafted “Universal Resource Identifiers—Axioms of Web Architecture”. This document consists of several axioms of URL design, many technical in nature; but the first (and arguably most important) is universality. By Berners-Lee’s definition, “any resource anywhere can be given a URI” and “any resource of significance should be given a URI” (emphasis mine). By conforming to these expectations of the Web we make it easier for our users to share and interact with it.
For the purposes of this chapter, I’ll be using the term URL; however, many quotes cited will use the term URI. Wikipedia helpfully clarifies the difference between these two terms:
A Uniform Resource Locator (URL), commonly informally termed a web address... is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifier (URI), although many people use the two terms interchangeably. A URL implies the means to access an indicated resource, which is not true of every URI.
What makes a cool URI? A cool URI is one which does not change. What sorts ...