Relative URL reference
ID: relative-url-reference
A Relative URL reference identifies a target using a base URL to supply missing context. It can contain a path, a query string or a fragment identifier, without independently specifying an entire network address. Resolution combines the reference with the base according to a defined algorithm.[ref]
Uniform Resource Identifier (URI): Generic Syntax. Sections4.2 and5.2: relative references and resolution
Trailing slashes provide an illuminating comparison. Resolving
c against https://example.org/a/b gives https://example.org/a/c; resolving it against https://example.org/a/b/ gives https://example.org/a/b/c. In the first case the last base path segment is replaced, while in the second it names a directory-like prefix.A parent-directory step is similarly concrete:
../image.png against https://example.org/a/b/page.html gives https://example.org/a/image.png. These outcomes follow from URL processing, not from examining an actual filesystem. No network request is needed to calculate them.[ref] New to topics? Read the docs here!