Summary

  • RFC 3986, January 2005, defines URI generic syntax: a "simple and extensible means for identifying a resource", derived from web practice going back to 1990.
  • It fixes the decomposition every parser now uses — scheme, authority, path, query, fragment — with percent-encoding for everything else.
  • It deliberately does not fix equality. Normalisation is a ladder of increasingly expensive comparisons an application may use to "reduce the probability of false negatives".

Two programs, one string, two different internets

Before there was a grammar, there was a guess. A browser decided where the host ended and the path began. A proxy decided differently. A library decided differently again. Two programs reading the same characters produced two different resources, and neither could be shown to be wrong, because there was nothing to be wrong against.

RFC 3986's achievement is not that it made everyone agree. It is that it moved the disagreement out of vendor accident and into a document, where it could at least be argued about in public.

The decomposition that ended the argument

Split a URI into scheme, authority, path, query and fragment and every implementation gets the same map. Add a define-once algorithm for stripping dot segments during reference resolution and the map stops drifting.

That is what a grammar can do. It tells you what each substring means. It does not tell you whether the resource exists, whether it is reachable, or whether it is the same thing as the one next door.

A ladder, because an answer would have been a lie

This is the part that deserves more credit than it gets. The specification could have declared two URIs equal or unequal and left the awkward cases to whoever lost. Instead it published a ladder: simple string comparison, syntax-based normalisation, scheme-based normalisation, protocol-based normalisation. Each rung costs more to climb and catches more.

Its own example is the honest one. example://a/b/c/%7Bfoo%7D and eXAMPLE://a/./b/../b/%63/%7bfoo%7d may reasonably be treated as equivalent — and only the application can decide whether it should. The grammar supplies the evidence. Somebody else has to supply the verdict.

Where identity stays contested

Everything above the grammar has to make the choice the grammar refused to make. A cache decides whether two requests are one request. An allowlist decides whether two hosts are one host. A user interface decides whether two links lead to one page. Each of those is a policy, held by a party, with a price attached to getting it wrong.

Percent-encoding, dot segments, letter case, default ports, internationalised names: every one of them manufactures strings that look different and resources that are the same, or the reverse. The gap is not a defect in the standard. It is the space in which a generation of cache poisoning, allowlist bypass and duplicate-content bugs has been built.

The lesson: publish the grammar, make somebody choose a rung

Grammar tells you where things are. Identity is a claim about a resource, and a claim needs a policy, a party and a cost of being wrong.

That lesson generalises well beyond URLs. When you standardise the shape of an identifier, say plainly that equivalence is a separate decision, because every layer above will need a rule and none of them will agree by accident. Specify the minimum that must be common and leave the rest to the people who bear the consequence of getting it wrong. A specification that pretends to settle sameness does not end the argument. It just moves it somewhere with worse records.