Questions tagged [fragment-identifier]

The fragment-identifier is the part of the URI/URL following the hash symbol. In the case of `http://mysite.com/page/#/one` then `/one` would be the fragment-identifier.

The fragment-identifier is the part of the URI/URL following the hash symbol. In the case of http://mysite.com/page/#/one then /one would be the fragment-identifier.

In URIs a hashmark # 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, and without help from a local application (see below) fragments do not participate in HTTP redirections.

A URI ending with # is permitted by the generic syntax and could be considered as 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 than the rest of the URI: namely, its processing is exclusively client-side with no participation from the web server — of course 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) requests a web 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.

For more info see wiki.

243 questions
0
votes
1 answer

BootStrap data-target fragment identifier cross-page navigation

This question concerns how to navigate to a target in the index.html file when using fragment identifiers in the BootStrap navbar to request a target in the index.html page. The navbar is contained in index.html. The navbar is also contained within…
0
votes
1 answer

HTML form: output # as part of URL

If YZ56765ZX is entered into the input field, the form should generate the following URL: http://www.example.com/quick-access/?track-code#trackingIds=YZ56765ZX The form:
apasajja
  • 576
  • 2
  • 6
  • 20
0
votes
2 answers

URL with # -> file_get_contents/sockets cuts URL after the #

I have looked for questions that may already have my answer, but I didn't find that specific problem. When I try to get the content of a file with a '#' in the URL, it cuts the part after the #. For example: I try to get the content of…
0
votes
1 answer

"/#action" Route in Routes.rb in Ruby on Rails

How can I create a route of this format (in Ruby on Rails routes.rb file): /#action/id Specifically with the "#" character inserted before the action controller...for example, see http://lala.com/#album/some-album-id thanks!
hagope
  • 5,523
  • 7
  • 38
  • 52
0
votes
1 answer

Browser history back with scrollable div

When I Jump to section 1 & 2 everything works fine, and the browsers I tested (IE8, FF3.6, Chrome 5.0.342.3) scrolls down to the respective anchor in the div. But when I press the browser history back button the div won't scroll back up. Is there…
0
votes
1 answer

URL issues, after a link is clicked on via email -- What's the deal? ##

My app is sending users email with the following: https://blah.chacha.com/feedback/##comment-reply-169 But for some reason, sometimes when the URL is loaded in some of the user's browsers the ## are being converted to something…
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
0
votes
1 answer

Django: How to send user to ancor after POST

Supposed there is a long page with a form at the end. Now the user submits this form with invalid data and it gets rerendered.I don't want to have him scrolling all the way back down, so i want to send him to a This is a related…
user3402383
0
votes
1 answer

Generating _escaped_fragment_ query string using nginx URL rewriting

I would like to manually produce the _escaped_fragment_ query parameter for search bots \ crawlers that don't implement _escaped_fragment_ support on their own. Using nginx, I tried to do the most obvious, yet it didn't work. Couldn't find any…
Oleg Belousov
  • 9,981
  • 14
  • 72
  • 127
0
votes
1 answer

Parse webpage with Fragment identifier in URL, using HTML Agility Pack

I want to parse webpage with Fragment identifier(#), f.e. http://steamcommunity.com/market/search?q=appid%3A570+uncommon#p4 When i use my browser(Google Chrome), i have different result, for different identifier(#p1,#p2,#p3), but when i use HTML…
Sam
  • 109
  • 1
  • 5
0
votes
1 answer

How to prevent fragment identifiers from showing in url

I have a link like this Log in after clicking on the link the url changes from http:/domain.com to http://domain.com#login_form and a login form pops up. But i do not want hash tag to be displayed in url. How…
Krish Gowda
  • 193
  • 2
  • 17
0
votes
1 answer

How to redirect to the absolute URL of a model instance while appending a hash?

I have a view that ends with the following line: #... item = get_an_item_from_the_db() return redirect(item) This should return an HttpResponseRedirect that redirects the client to the following page: /item/12/ However, I would like to append a…
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
0
votes
3 answers

Javascript anchor navigation

I am creating a website with the "anchor navigation" like used with facebook and google mail. I have got it working but not fully. When I load the page with something like #contact it won't load it in unless I click the link for it. Also, would…
Callum
  • 1
  • 1
  • 1
0
votes
1 answer

Redirecting specific (but a lot of) URLs to include specific text

The Problem: First of all my site is using WordPress. I am using the facebook sharer on lots of links that include a # or fragment identifier in the URL. The problem with that is the facebook sharer doesn't allow this and stops the link. For example…
user2491661
0
votes
3 answers

Finding nearest HTML fragment identifier to scroll position with jQuery

How does one locate the nearest HTML fragment identifier (hashtag href) based on window's current scroll position? I want to make a bookmarking feature via JS/jQuery that captures the nearest section the user was in when hitting the bookmark button.…
dooleyo
  • 872
  • 1
  • 9
  • 13
0
votes
1 answer

How to structure Fragment identifiers in my webpage

This is more of a best practices/ease of upkeep question. I have several webpages where I would like to make browsing easier. So, to do that I am going to use Fragment identifiers (internal links). Here is an example of some of my HTML:
Thomas07vt
  • 219
  • 1
  • 4
  • 11