Relative URL resolution under a specified base, distinct from migration redirects, source trust or fetching permissions.
Substantively revised October 21, 2026. Author interpretation, documented cases and hypothetical examples are distinguished below.
The captured string table.csv does not identify the same address everywhere. Against one base it points inside a notes directory; against another it replaces the final notes segment. Adding a trailing slash changes the result without changing the captured reference at all. A useful link capture therefore needs more context than the text between quotation marks.
Direct answer
Retain the original reference and the base used to interpret it, then resolve them with an implementation appropriate to the workflow. Inspect the resulting scheme, host, path, query and fragment as relevant. Do not substitute string concatenation for reference resolution or assume that every input will remain on the base host. The local examples below compute addresses only. They do not fetch a resource, verify a source, establish permission to access it or demonstrate a browser's selection of its document base.
Key takeaways
A relative reference describes a relationship to a base, not a complete standalone address. Saving only the reference can make a later replay ambiguous. Saving only the resolved address can lose the evidence explaining how the capture was interpreted.
A path ending in a slash and a path with a final non-slash segment can supply different bases for the same relative path. The visible resemblance of the addresses does not establish that their resolution behavior is interchangeable.
Resolution and retrieval answer different questions. A library can compute a well-formed target string while the target is unavailable, unrelated to the research claim or outside the intended access scope. Keep the calculated relationship distinct from observations of the actual resource.
Definitions and relationships
A reference is the address expression captured from the source. It may supply a relative path, an absolute path, a query, a fragment, a network location or a complete address. A base supplies context needed to interpret the parts the reference does not provide.
A resolved target is the address produced from that relationship under the selected implementation. It is not automatically the address originally requested by a capture tool, the address of a local saved copy or the eventual destination of a later retrieval. Those can be separate observations in a real workflow.
Reference resolution uses structured components rather than arbitrary text addition. Dot segments, leading slashes and supplied network locations can affect which components are inherited or replaced. The method under review should make those changes inspectable instead of treating every reference as a filename appended to one folder string.
The problem with a useful note and an incomplete address
Imagine a hypothetical researcher capturing a table link from a notes page. The saved note includes the visible reference ../data/table.csv but omits the base. Later, the note is opened from an archive directory and resolved there. The resulting address reflects the archive context rather than the relationship present when the reference was captured.
The original reference has not changed, so a simple text comparison can falsely reassure the operator. The missing evidence is the context that gives the reference its address meaning. A capture can preserve the characters while losing the relationship needed to interpret them.
The practical question is which base the actual workflow uses and why that base is appropriate. Record it with the reference before using the calculated target as a source locator. A link string that was meaningful inside one document context should not silently inherit whichever context happens to be available later.
Root cause: an address relationship is stored as an isolated string
Relative references are compact because they depend on surrounding context. That economy becomes a liability when capture separates the reference from the context without recording the dependency. A later operator sees the characters but cannot tell which directory or authority supplied the missing components.
The same blind spot appears when an implementation builds addresses through concatenation. The operation assumes the reference merely extends the base's characters. A parent-directory segment or a supplied host shows that the intended transformation is more structured than that.
The repair is to preserve and inspect the pair. Keep the raw reference, establish the base and record the computed target. Then evaluate retrieval or trust separately when required. This gives each claim a clear basis instead of allowing a plausible-looking address to stand for an unobserved source relationship.
Framework: the Resolution Triangle
The Resolution Triangle is the author's proposed inspection method. Its three corners are Captured Reference, Established Base and Calculated Target. Its purpose is to explain one address interpretation, not to certify resource availability, safe fetching or agreement between every URL and URI implementation.
Captured Reference preserves the expression as it appeared in the selected source. Do not replace it immediately with a guessed absolute string. Its punctuation shows whether it supplied a parent segment, a leading slash, a query or another component that affected the calculation.
Established Base records the actual context used by the workflow. A document address and a local archive address need not be interchangeable. Determine the base through the relevant processing context instead of borrowing whichever address is easiest to find in the research note.
Calculated Target records the implementation's output and the relevant component changes. Inspect the host as well as the path. A reference can supply a new network location rather than merely append a filename within the original one. The triangle is complete only when the output can be traced back to the recorded reference and base.
Applying the triangle to a captured table link
Start with the invented base https://example.test/research/notes/page.html and reference ../data/table.csv. The local resolution produces https://example.test/research/data/table.csv. The parent segment changes the path relationship; concatenating the strings literally would not express that result.
Record both inputs alongside the calculated address. If the note is later moved into another archive, the recorded base still explains the original interpretation. A fresh calculation against the archive's location would be another operation that needs its own justification.
Then inspect what the task actually requires next. If it is only documenting the source's address relationship, the local calculation can be relevant evidence. If it requires reading the table, the workflow still needs an authorized retrieval and content check. The triangle does not turn calculation into an observation of the resource.
Documented example: resolution transforms components
RFC 3986 describes reference resolution relative to a base, including path merging and dot-segment processing. These mechanisms explain why ../data/table.csv should be interpreted through components rather than literal text addition. [S1]
The reference is a standards-track URI specification from January 2005. The article does not equate every edge case in that model with every current WHATWG URL implementation. Its local tests select ordinary ASCII HTTPS cases and record the actual results from two implementations.
The useful principle is the dependency between the reference and its established base. A later normalized address can be convenient, but retaining the pair makes it possible to inspect how that address was obtained and whether another base would have changed the answer.
Documented example: Python can inherit or replace the host
Python's urllib.parse documentation describes urljoin and notes that a reference supplying an absolute or network-path address can contribute its own hostname or scheme. The base is therefore context, not a guarantee that every result remains within its original host. [S2]
The local fixture includes both a network-path reference beginning with two slashes and a complete absolute reference. Their changed hosts are expected consequences of the supplied inputs, not evidence that the resolver fetched another site or bypassed an access rule.
The operational consequence is to inspect the resulting address before a later action that depends on its destination. Address construction and access decisions remain separate. A correct resolution can produce a destination that the research workflow did not intend to retrieve.
Documented example: an API constructor can use a base
The WHATWG URL Standard defines the URL API's constructor with an optional base and illustrates why relative input needs a suitable base. It also distinguishes its processing model from older URI concepts in some cases. This supplies the API context for the actual Node constructor used in the experiment. [S3]
The author executed Node's URL object locally, without opening a browser. The standard's document-base examples do not become evidence that the experiment selected a base from a real HTML document. Here the base is supplied explicitly as a fixture input.
That distinction keeps the evidence precise. Two APIs agreeing on the chosen cases is useful but narrower than full conformance, universal equivalence or a measurement of every consuming environment. Record the inputs and version rather than extending a small agreement beyond the cases actually examined.
Case study: eight references against one explicit base
The author selected eight invented references and one base using the reserved example.test domain family. The test ran Python 3.11.9 urljoin and Node v24.15.0 URL construction. It compared the computed strings with explicit expected addresses. No DNS lookup, network request or source retrieval occurred.
For the base ending /research/notes/page.html, table.csv resolved inside /research/notes/, while ../data/table.csv resolved inside /research/data/. A reference beginning /shared/ resolved from the host root. These three cases distinguish a sibling path, a parent relationship and an absolute path under the same host.
The reference //archive.example.test/data.csv supplied another host while retaining HTTPS. The absolute reference https://other.example.test/x supplied its own complete target. These inputs challenge the assumption that passing a familiar base to a resolver limits the result to that host.
The remaining references supplied a query, a fragment or an empty string. The selected query reference retained the base path and supplied q=one; the fragment reference supplied section on the base document; the empty reference retained the selected base address. Both implementations matched the expected results for these eight ordinary cases.
A trailing slash changes the relationship
The experiment separately compared two invented bases: https://example.test/research/notes/ and https://example.test/research/notes. Resolving table.csv against the first produced /research/notes/table.csv. Resolving it against the second produced /research/table.csv.
The second base's final notes segment did not behave as the directory context an operator might infer from the word. The address syntax, including the slash, determined the selected path relationship. A human-friendly label cannot supply a missing path delimiter.
This difference is useful when diagnosing a capture that points one directory higher than expected. Inspect the actual recorded base before adding manual path fragments. A guessed repair can obscure the underlying distinction and create another address whose derivation is harder to explain.
What the twenty-four assertions establish
The report records twenty-four passing assertions. Sixteen compare the eight common references under Python and Node. The remaining checks cover the two trailing-slash bases, their different results, a literal-concatenation negative, host changes, query preservation for a fragment-only reference and retention of the raw reference.
The fragment control uses a base with q=old and confirms that the selected fragment-only resolution retains that query in the Python result. This is a component relationship, not evidence that the server treats the query a particular way or that the fragment identifies existing content.
The exercise does not implement browser document-base selection, redirects, a URL allowlist, permission checks, fetching, source verification or complete RFC and WHATWG conformance. Agreement is reported only for the chosen cases. The output strings are calculations over invented inputs, not successful visits to those addresses.
Failure example: literal concatenation preserves the wrong structure
A hypothetical importer takes the document base and adds ../data/table.csv to its end as text. The resulting string still contains familiar parts of both inputs, which can make it look traceable. It has not applied the intended parent-path relationship.
The fixture explicitly checks that the literal concatenation differs from the resolved target. This negative control is small enough to inspect directly: the base's document filename should not simply become the prefix of a new relative path appended after it.
The correction is to use the selected resolution implementation with the correct base and inspect its output. Keep the raw pair so a reviewer can distinguish a resolution decision from a hand-edited guess. A string containing all the original characters is not necessarily a faithful expression of their address relationship.
Failure example: resolving the right reference against the wrong context
Another hypothetical importer preserves ../data/table.csv exactly but later resolves it against the archive note's address. The local calculation can execute correctly under that supplied base and still fail to reproduce the source's intended target. The implementation cannot determine that the caller chose the wrong context from the reference alone.
This is why a result should be tied to an established base rather than merely a library name. Tool correctness and input appropriateness are different conditions. A successful constructor call establishes neither the history of the captured reference nor the truth of the associated research claim.
The repair begins with the capture record: determine the actual base relationship, preserve it and recompute deliberately. If the original context cannot be established, record the ambiguity instead of calling one guessed target verified because it looks plausible.
Resolution is not retrieval or source trust
A computed target can be structurally appropriate and still fail to return the intended material. Availability, redirects, authentication, content versions and source reliability concern later interactions or evidence that this experiment does not observe.
Keep those claims separate when reporting a successful link repair. Saying that a relative reference resolves to a particular address is narrower than saying that the source was retrieved or that it supports a conclusion. The narrower statement is useful because its inputs and output can be reproduced without pretending to have performed the later work.
The same applies to destination policy. A changed host can be the expected resolution of a supplied reference, but it does not automatically authorize access. The fixture records the change as a calculated property and leaves subsequent actions to the workflow's actual purpose and authorization.
Common mistakes and specific corrections
The first mistake is retaining a relative reference without its base. Save the pair when the interpretation depends on context. A future note location should not silently become a replacement base for an earlier source relationship.
The second is treating the last path segment as a directory because its word looks like one. Compare the exact base, including the trailing slash. The two notes examples demonstrate why that visible punctuation changes the result.
The third is assuming urljoin means remain on this host. Inspect the actual components supplied by the reference and the calculated target. The network-path and absolute cases demonstrate expected host replacement without any network action.
The fourth is interpreting two matching libraries as universal agreement. Record the selected inputs, runtime versions and scope. Unexamined characters, schemes and parsing edge cases remain outside the demonstrated equivalence.
Counterargument: saving an absolute address is enough
For many downstream uses, a resolved absolute address is convenient and sufficient to attempt a later retrieval. That counterargument correctly values a self-contained locator. It becomes incomplete when the workflow needs to explain how an ambiguous or changed capture was interpreted.
Retaining the original reference and base provides that explanation. It can reveal that a later mistake came from another base, a manual path edit or an assumption about a directory. The resolved address is the useful result; the pair preserves the reasoning inputs needed to investigate it.
There is a small maintenance cost to keeping those fields together. The benefit grows when captures move between archives or different tools interpret them. Choose the record detail appropriate to the task, but do not discard the context and then imply that the remaining relative string carries the same address meaning independently.
Action plan
Choose one authorized relative-link capture and identify the reference exactly as retained. Determine the base actually used by its processing context. Keep the inputs separate from a local archive address or another convenient locator whose role has not been established.
Resolve the pair using the intended implementation and inspect relevant components. Test a sibling path, a parent path, a root-relative path and an input supplying another host. Include the trailing-slash distinction if directory assumptions matter to the route.
Record the calculated target with the raw pair and tool version. If the task requires retrieval, perform that authorized check separately and record what was actually received. Do not substitute resolution output for a source-content observation.
Accept the repair for its demonstrated property. A reproducible address relationship can be complete at that boundary while access, source version and claim verification remain separate. The handoff should make those distinctions clear enough that the next operator does not inherit a stronger conclusion than the evidence supports.
FAQ
Is table.csv a complete address by itself?
Not in the tested relative-reference use. Its target depends on the supplied base. Recording the reference alone can leave later interpretation ambiguous.
Why retain the original reference after resolution?
It explains how the calculated target was obtained. The pair helps diagnose changed bases or manual edits that a resolved address alone may not reveal.
Does a trailing slash matter?
Yes in the selected path cases. The notes/ base retains notes as directory context, while the notes base without the slash replaces its final segment when resolving table.csv.
Is string concatenation equivalent to resolution?
No. The parent-path fixture produces a different result from appending its characters to the document base. Resolution interprets components rather than merely joining text.
What does a leading slash do in the fixture?
The selected /shared/table.csv reference resolves from the base host's root. It does not remain under the notes directory.
Can a reference replace the base host?
Yes. The network-path and absolute examples supply other hosts. The calculated change is an address property, not an observed retrieval or an access authorization.
Did either implementation fetch the result?
No. Python and Node computed address strings locally over invented inputs. The test performed no DNS lookup or network request.
Did the study run a browser?
No. It executed Node's URL constructor and Python's urljoin. It did not select a base from a browser document or test rendered link behavior.
Do both APIs agree on every possible input?
The experiment establishes agreement only on its eight ordinary ASCII HTTPS cases. It makes no universal equivalence or full-conformance claim.
Does a fragment-only reference replace the query?
The selected Python control retains the base query and adds the fragment. That result concerns the tested components and does not establish what any server or document does with them.
Does a valid target prove the source supports a claim?
No. Resolution does not inspect source contents. Claim verification requires evidence about the material actually retrieved and its relationship to the conclusion.
Can the archive's address be used as the original base?
Only when that is the correct context for the intended interpretation. Moving a saved reference does not automatically make the new archive location equivalent to its earlier base.
What if the original base cannot be established?
Record the ambiguity. A guessed target can be labeled as a candidate, but a successful calculation over that guess does not verify the original source relationship.
Is the RFC the same as every current URL implementation?
No such claim is made. The article distinguishes the URI reference model from the WHATWG API context and records the actual local outputs for its limited cases.
What belongs in an accepted resolution record?
Keep the captured reference, established base, calculated target, actual implementation and observations made afterward. Label retrieval and source-trust results separately from the calculation.
Recommended books
HTTP: The Definitive Guide by David Gourley, Brian Totty, Marjorie Sayer, Anshu Aggarwal and Sailu Reddy, published by O'Reilly in September 2002, provides historical web-architecture context. Its five credited authors and specific edition matter. Current references and actual runtime observations govern this article's resolution claims.
Python Cookbook, third edition, by David Beazley and Brian K. Jones, published by O'Reilly in May 2013, offers practical context for using structured interfaces rather than improvising text manipulation. It does not establish universal agreement between Python's URL processing and every browser implementation.
The Pragmatic Programmer, twentieth anniversary edition, by David Thomas and Andrew Hunt, published in September 2019, supplies context for making assumptions explicit and testing small counterexamples. The Resolution Triangle is the author's proposed method, and the twenty-four assertions are independent local calculations.
Further exploration
Find one saved reference whose target seems to have moved after the note was archived. Reconstruct the raw reference and the base used at each step before editing the final address. The discrepancy may concern context rather than a changed source string.
Then test the smallest input that exposes the assumption: a missing trailing slash, a parent segment or a supplied host. Retain the pair and calculated target so the accepted address has an inspectable derivation, with later retrieval evidence kept at the boundary it actually observes.
Primary evidence sources
- [S1] Section5.2 reference transformation and dot-segment sections actually read
- [S2] urljoin and absolute or scheme-relative reference overriding host actually read
- [S3] Base URL requirement, relative URL constructor examples actually read
Related concepts: systems thinking, wealth structure, and the survival loop. Read the editorial policy and citation guide.