Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Basics  





2 Examples  





3 Proposals  





4 See also  





5 References  





6 External links  














URI fragment






Deutsch
فارسی
Français
Română
Српски / srpski

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

(Redirected from Fragment identifier)

In computer hypertext, a URI fragment is a stringofcharacters that refers to a resource that is subordinate to another, primary resource. The primary resource is identified by a Uniform Resource Identifier (URI), and the fragment identifier points to the subordinate resource.

The fragment identifier introduced by a hash mark # is the optional last part of a URL for a document. It is typically used to identify a portion of that document. The generic syntax is specified in RFC 3986.[1] The hash mark separator in URIs is not part of the fragment identifier.

Basics

[edit]

In URIs, a hash mark # introduces the optional fragment near the end of the URL. The generic RFC 3986 syntax for URIs also allows an optional query part introduced by a question mark ?. In URIs with a query and a fragment, the fragment follows the query. Query parts depend on the URI scheme and are evaluated by the server—e.g., http: supports queries unlike ftp:. Fragments depend on the document MIME type and are evaluated by the client (web browser). Clients are not supposed to send URI fragments to servers when they retrieve a document.[1][2]

A URI ending with # is permitted by the generic syntax and is a kind of empty fragment. In MIME document types such as text/html or any XML type, empty identifiers to match this syntactically legal construct are not permitted. Web browsers typically display the top of the document for an empty fragment.

The fragment identifier functions differently to the rest of the URI: its processing is exclusively client-sided with no participation from the web server, though the server typically helps to determine the MIME type, and the MIME type determines the processing of fragments. When an agent (such as a web browser) requestsaweb resource from a web server, the agent sends the URI to the server, but does not send the fragment. Instead, the agent waits for the server to send the resource, and then the agent processes the resource according to the document type and fragment value.[3]

In an HTML web page, the agent will look for an anchor identified with an HTML tag that includes an id=orname= attribute equal to the fragment identifier.

Examples

[edit]

Proposals

[edit]

Several proposals have been made for fragment identifiers for use with plain text documents (which cannot store anchor metadata), or to refer to locations within HTML documents in which the author has not used anchor tags:

See also

[edit]

References

[edit]
  1. ^ a b "RFC 3986 Uniform Resource Identifier (URI): Generic Syntax". Internet Engineering Task Force. January 2005. Retrieved 2012-03-06.
  • ^ R. Fielding, Ed., Adobe; J. Reschke, Ed., greenbytes (June 2014). "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing". Internet Engineering Task Force (IETF). Retrieved 2023-12-27. The target URI excludes the reference's fragment component, if any, since fragment identifiers are reserved for client-side processing{{cite web}}: CS1 maint: multiple names: authors list (link)
  • ^ "Representation types and fragment identifier semantics". Architecture of the World Wide Web, Volume One. W3C. 2004. Retrieved 2011-07-13.
  • ^ "Validity constraint: ID". XML 1.0 (Fifth Edition). W3C. 2008. Retrieved 2011-07-13.
  • ^ "xml:id Version 1.0". W3C. 2005. Retrieved 2011-07-13.
  • ^ "Issue 77024". Chromium. 2011. Retrieved 2011-07-13.
  • ^ "Media Type Review". W3C Media Fragments Working Group. 2009. Retrieved 2009-04-29.
  • ^ "New Feature: Link within a Video". 2006-07-19. Retrieved 2011-07-13.
  • ^ Link to Specific Content in Gmail, Google Blogoscoped, 2007-11-17
  • ^ Bryan, P (2013-04-02). "RFC 6901 – JavaScript Object Notation (JSON) Pointer". The Internet Society. Retrieved 2022-07-14.
  • ^ "Parameters for Opening PDF Files – Specifying parameters in a URL" (PDF). Adobe. April 2007. Retrieved 2017-09-20.
  • ^ Taft, E.; Pravetz, J.; Zilles, S.; Masinter, L. (May 2004). "RFC 3778 – The application/pdf Media Type". tools.ietf.org. The Internet Society. doi:10.17487/RFC3778. Retrieved 2017-09-20.
  • ^ "Linking – SVG 1.1 (Second Edition)".
  • ^ "Media Fragments URI 1.0 (basic) W3C Recommendation". Retrieved 2012-09-25.
  • ^ "Scroll to Text Fragment". Chrome Platform Status. Google Chrome. Retrieved 2020-05-18.
  • ^ Kelly, Gordon. "Google Chrome 80 Released With Controversial Deep Linking Upgrade". Forbes. Retrieved 2020-06-04.
  • ^ "WICG/scroll-to-text-fragment: Proposal to allow specifying a text snippet in a URL fragment". GitHub. WebPlatform.org Incubator Community Group at W3C. Retrieved 2020-05-18.
  • ^ "Pypi md5 check support". Retrieved 2011-07-13. Pypi has the habit to append an md5 fragment to its egg urls, we'll use it to check the already present distribution files in the cache
  • ^ a b "Hash URIs". W3C Blog. 2011-05-12. Retrieved 2011-07-13.
  • ^ "HTML 5.1 2nd Edition". W3C. 2017. Retrieved 2018-08-03.
  • ^ a b "Proposal for making AJAX crawlable". 2009-10-07. Retrieved 2011-07-13.
  • ^ "(Specifications) Making AJAX Applications Crawlable". Google Inc. Retrieved 2013-05-04.
  • ^ "Manipulating the browser history". Mozilla Developer Network. Retrieved 2017-02-23.
  • ^ "Deprecating our AJAX crawling scheme". Official Google Webmaster Central Blog. Retrieved 2017-02-23.
  • ^ Fragment Search, gerv.net
  • ^ Fragment identifiers for plain text files, Erik Wilde and Marcel Baschnagel, Swiss Federal Institute of Technology (ETH Zürich), Proceedings of the sixteenth ACM conference on Hypertext and hypermedia doi:10.1145/1083356.1083398
  • ^ Text-Search Fragment Identifiers, K. Yee, Network Working Group, Foresight Institute, March 1998
  • ^ bmcquade; bokan; nburris (2022-03-24). "Feature: Scroll to Text Fragment". Chrome Platform Status. chromium.org. Retrieved 2022-05-03.
  • ^ LiveURLs project
  • ^ The technology behind LiveURLs, accessed 2011-03-13
  • ^ "Web Marker" Firefox add-on, accessed 2011-03-13
  • ^ "EPUB Canonical Fragment Identifiers 1.1". idpf.org. Retrieved 2020-06-03.
  • [edit]
    Retrieved from "https://en.wikipedia.org/w/index.php?title=URI_fragment&oldid=1227213090"

    Categories: 
    URI schemes
    Identifiers
    Hypertext
    Hidden categories: 
    CS1 maint: multiple names: authors list
    Articles with short description
    Short description is different from Wikidata
    Use dmy dates from February 2023
     



    This page was last edited on 4 June 2024, at 12:35 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki