Summary

  • Relative references omitted scheme, authority or path information already supplied by a known base, saving repetition and allowing groups of documents to move together.
  • Resolution is a deterministic syntactic transformation: select an absolute base, inherit or replace components according to reference form, merge paths, remove complete . and .. segments, then recompose the target.
  • A relative reference is not a globally stable identifier by itself; records, signatures and audits must preserve its effective base or the resolved absolute target.

A link could be shorter because its document already knew more

An absolute locator repeats a great deal. Every link inside one collection may carry the same scheme, network location and most of the same path. The document that contains those links already arrived from somewhere, and that location supplies context.

RFC 1630, Tim Berners-Lee's 1994 early URI proposal, described a partial form inside an object whose own URI was well defined. The benefits went beyond saving characters. Related objects could use local references and later move as a group without rewriting every edge. Higher-order naming changes remained hidden from the documents below them.

The saving was conditional. RFC 1630 warned that a full form should be used when a reference travelled outside a well-controlled context. A short link does not contain the information it omits. Its portability depends on the base travelling with it, or being reproducibly established where it is read.

The early rules already treated path hierarchy as shared syntax. Slash divided levels; complete . and .. elements referred to the current and parent level. A trailing slash mattered because it represented an empty final segment. The base ending in a directory-like position and the base ending in a resource-like position did not lend the same path.

Relative URL became a standards-track transformation

RFC 1808, published in June 1995, defined relative URLs as compact locations against an absolute base URL. It made inheritance explicit. The base could supply scheme, network location and parts of the path, while the reference supplied only what changed.

This was not textual concatenation. A reference beginning with a scheme was already absolute. One beginning with a network location replaced the authority. One beginning with a slash replaced the path from its root. A plain relative path replaced or extended the last portion of the base path. Queries and fragments followed their own component rules.

The distinction protected meaning during movement. If a directory of documents moved from one host or prefix to another while preserving its local hierarchy, its relative edges followed the new base. An absolute edge continued to point to the old authority. Neither form was universally better; each declared a different dependency.

HTML gave the document a way to carry its missing context

RFC 1866, the 1995 HTML 2.0 specification, made relative addressing part of ordinary hypertext. Anchors, links, images, inputs and forms could refer to absolute or relative targets.

An optional BASE element could provide an absolute address for interpreting those references when the document was read out of context. Without it, the base followed the relative-URL rules associated with the document's retrieval. This made saved, transported or encapsulated content capable of preserving its original link context.

It also concentrated control. One embedded base could reinterpret every relative target in the document. The mechanism was valuable because it avoided repeating the same prefix; for exactly the same reason, changing that one prefix affected a whole graph of links.

The base is therefore not presentation metadata. It is an input to resource identity. A system that strips, substitutes or applies it at a different stage is not merely reformatting a document.

Generic URI syntax separated inheritance by component

RFC 2396, published in 1998, generalized resolution from URLs to URI references. The operation began with parsed components rather than an undifferentiated string. Scheme, authority, path, query and fragment could be supplied, inherited or replaced according to the reference form.

For a relative path, the resolver removes the last segment of the base path, appends the reference path and processes dot segments. That is why the final slash of a base remains material: it changes which segment is considered last.

The path operation does not make every URI a filesystem. Complete dot segments have a defined role within hierarchical reference resolution. A segment that merely contains two dots among other characters remains ordinary segment data. Scheme-specific handlers can impose additional meanings, but generic syntax does not infer them.

Nor does resolution contact a server. It produces the target identifier. Dereferencing, redirection, authentication and resource existence are later and separate decisions.

The current contract chooses one base before resolving

RFC 3986, the current generic URI syntax, requires a known base for relative references apart from the narrow fragment-only case. The base must be absolute, and any fragment is removed before it serves in that role.

The standard gives base sources a precedence. A base embedded in the content is closest to the reference. If absent, an encapsulating entity can supply one. The retrieval URI follows, then an application-dependent default. This layered order turns several possible contexts into one effective input.

Reference form then controls inheritance. A reference with a scheme supplies its own principal components. A // network-path form borrows the scheme but supplies authority. A leading / borrows scheme and authority while replacing the path. A relative path merges with all but the last segment of the base path, except when a defined authority has an empty path, where the merge begins with /.

An empty reference path inherits the base path. If no query is supplied, it inherits the base query as well. The reference's fragment becomes the target fragment. These are component decisions, not a general rule that blank text always means “do nothing.”

Dot segments were instructions during resolution, not durable levels

RFC 3986 specifies remove_dot_segments after path extraction and merging. A complete . segment contributes no lasting level. A complete .. removes the preceding output segment when one exists. Excess parent segments are removed according to the algorithm rather than escaping above an imagined universal filesystem root.

This treatment is syntactic. It preserves a common hierarchical result without asking a server whether a directory exists. Implementations can use stacks instead of the specification's string buffers, but accepted inputs should yield the same recomposed path.

Same-document status is also judged after resolution. A surface form consisting only of a fragment is the obvious case, yet the current rule compares the resolved absolute target with the base. It does not assign identity solely from how short the reference looks.

Portability was controlled dependence, not independence

Relative links made document sets replaceable because their internal structure did not name a single permanent host or prefix. They gave an author local autonomy without a central link registry. But the link was never context-free. Its missing address came from a base controlled by the document, container, retrieval process or application.

That distinction matters outside rendering. A provenance record containing only ../source cannot establish a public source after the record is detached from its original base. A signed manifest that covers the short text but not the effective base has left part of the target unsigned. An audit log that records only the resolved address cannot show which contextual decision produced it.

The durable evidence is a pair: original reference and selected base, plus the resolved target when action followed.

Sources

These specifications establish syntax, historical rationale and algorithms. They do not establish current browser quirks, application routing, content-security policy or the safety of a live deployment.