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

Problems with the Google Earth Internal Browser using GWT pages

Good afternoon, I'm developing a google-earth web application, where users can use the desktop Google Earth program to perform searches. One problem I'm running into is that, when the Internal Browser tries to hit a GWT page I have written, with…
VerticalEvent
  • 619
  • 1
  • 11
  • 18
0
votes
1 answer

Setting page state from URL hash - syntax error (jQuery)

I'm trying to debug a script on a WordPress site that that allows for dynamic filtering of job listings (via Jobvite.) When the page is initially loaded without any URL parameters attached-- e.g. site.com/jobs/all-positions-- the filters work fine;…
nickpish
  • 839
  • 4
  • 24
  • 43
0
votes
2 answers

How to use SVG fragment identifier for CSS background image on iOS?

I'm using SVG sprite and referencing fragment identifiers in it for CSS background image. The CSS code looks like this: background: url(sprite.svg#icon-1);. It works on Firefox/Win7, Google Chrome/Win7, IE11/Win7, IE10/Win8, Firefox/Android 4.4.2,…
Ian Y.
  • 2,293
  • 6
  • 39
  • 55
0
votes
1 answer

Putting a fragment identifier inside of a query parameter

I am trying to redirect to a URL path that contains a query parameter called next, which is itself a URL path that contains a fragment identifier. Here is the JavaScript code I tried: window.location.href = "/gauth?next=" + window.location.pathname…
pzp
  • 6,249
  • 1
  • 26
  • 38
0
votes
1 answer

.htaccess redirect with fragment

I need to issue a redirect, using .htaccess, to a URL with a fragment (also known as an anchor), but it's automatically escaping the #. At the moment I want a hard-coded fragment, but for the sake of others if you know how to take it from the URL…
Greg
  • 316,276
  • 54
  • 369
  • 333
0
votes
1 answer

How to Avoid Scroll on Hashed A Tag Click with Fixed Height Content

I am currently encountering a tricky issue with hashed anchor links. Here is a simple representation of my HTML code :
0
votes
1 answer

Set hash of blank page opened with window.open()

I have a page that was dynamically made using javascript's window.open(); function. This opens a new window with a URL of about:blank and then I inject the rest of the code into the page. I'm trying to detect whether or not the user refreshes the…
Arlo
  • 963
  • 3
  • 11
  • 20
0
votes
1 answer

jQuery append tags to a URL without refreshing

I'm trying to create a "builder" page where the user can select an element from a drop down list and a builds a webpage of sorts. We don't have access to a database for this information, so I'd like to be able to save the elements in the URL so the…
ntgCleaner
  • 5,865
  • 9
  • 48
  • 86
0
votes
1 answer

toggle element on page load with a hash link not working

I am new to javascript and using jQuery toggle effect on a button to open and close the following div. Here is my html:
0
votes
1 answer

Laravel 4 Redirect with fragment url not working

I'm creating a web app using laravel 4. I'm having an issue with redirecting back to the previous page with a fragment identifier after a form submission. It just redirects slightly below the top of the page instead of to the specified location. How…
Scott
  • 5,074
  • 3
  • 16
  • 13
0
votes
0 answers

How do I add a rewrite rule to nginx to automatically add a hashtag?

I'm writing a single page application using Angular 1.4, and I'd like to add a rewrite rule to nginx using a regular expression so that an external link doesn't need to include the hashtag, and it will get added automatically, like…
0
votes
1 answer

jquery and the # sybmol in the url (and ajax)

So I've got a simple page with different ways to filter the data (almost everything is working.) For example, you have a page with a list of the users. You can choose a page number, you can choose what to sort by (and what direction to sort in) and…
Matthew
  • 15,282
  • 27
  • 88
  • 123
0
votes
1 answer

Anchor not scrolling correctly

I have a layout something along the lines of :
My banner has position:fixed; and is roughly 200px high. The problem is that when I click a link with a fragment identifier, the page scrolls and…
Purplefish32
  • 647
  • 1
  • 8
  • 24
0
votes
3 answers

Regex - Get query string without hash

Need to be able to pass in a URL, and the regex should be able to extract just the query string. The key part though is omitting the hashbang and anything after it. This is what I have so far, which ignores the hash but still gets text afterwards.…
0
votes
0 answers

Can search engines track # in your site?

I have created one paged site and it has a lot of
blocks with unique IDs. When I click links that has reference to these IDs my borwsers address line will show this: my.example.com/index.html#my_id Do search engines detect this?
Mr.D
  • 7,353
  • 13
  • 60
  • 119