Fragment identifier

A fragment identifier ( engl. fragment identifier) ​​is a URI (also a URL) added locally to address parts of a document and is therefore not transmitted at a request to the server. The interpretation depends on the type of resource and the parser. The fragment identifier is marked with a specific character, the hash character ( #) in the URI.

Examples:

  • In HTML, refers http://www.example.com/document.html # anchor1 to the HTML element in document.html that the anchor attribute name = " anchor1 " (or id = " anchor1 " ) includes.
  • In XML, it should be possible with http://www.example.com/document.xml # xpointer ( / / camel ) establish an XPointer that provides all XML elements with the name " Camel" from the document.xml file as a result.
  • For PDF documents describes http://www.example.com/document.pdf # page = 123 page 123 in document.pdf.

Syntax

According to RFC 2396 section 4.1 in conjunction with Section 2 are subject to a number of limitations fragment identifier. So they must not contain spaces or percent sign; However, with regard to reserved characters are not quite as restricted as URL, since there is no activity on the server to be controlled more. Another # should nevertheless not be included; & Is undesirable because of ambiguity on character entities; ' And ' than typical string delimiter as well.

Regularly will also demanded that they should comply with the XML rules for node names; so that they must begin with a letter.

344261
de