A fragment identifier is the component introduced by # in a URL, supplying a reference within or associated with the identified resource. In https://example.org/manual.html#setup, setup is the fragment. Interpretation depends on the representation and its rules; an HTML element identifier is a familiar example, not the only possible meaning.[ref]
The Hypertext Transfer Protocol target excludes the fragment. A browser requesting the preceding example requests the document without #setup, then can process the fragment locally. This differs from a query string, which can help identify the requested resource.[ref]
For an illustrative comparison, manual.html#setup and manual.html#examples can select different places in one retrieved document. Changing only the fragment therefore need not imply fetching two different document bodies. Conversely, a syntactically valid fragment does not prove that a matching destination exists in the current document.

Articles by others on the same topic (0)

There are currently no matching articles.