Questions tagged [uri-fragment]
24 questions
230
votes
12 answers
Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)?
Assuming a URL of:
www.example.com/?val=1#part2
PHP can read the request variables val1 using the GET array.
Is the hash value part2 also readable? Or is this only upto the browser and JavaScript?

Robin Rodricks
- 110,798
- 141
- 398
- 607
21
votes
1 answer
Is the URL fragment identifier sent to the server?
Possible Duplicate:
Can PHP read the hash portion of the URL?
The (famous?) web site mega.co.nz uses a hash mark in URLs to link to encrypted files; the portion of the URL after the hash mark contains a password, and encryption is claimed to…

vincenzoml
- 413
- 1
- 3
- 10
19
votes
4 answers
How to use htaccess to rewrite url to html anchor tag (#)
I have a situation where I want to take the following URL:
/1/john
and have it redirect using Apache's htaccess file to go to
/page.php?id=1&name=john#john
so that it goes to an html anchor with the name of john.
I've found a lot of reference to…

Lee L
- 191
- 1
- 1
- 3
9
votes
5 answers
How to monitor the changes in the url (Fragment identifier - the anchor portion of a URL )
I'm making a website that tend to handle all the request in one page (Ajax).
so i thought that I could trap every user's click on a link and check IF it's on my website i do something on JavaScript like an ajax request for example, ELSE it would…

Omar Al-Ithawi
- 4,988
- 5
- 36
- 47
6
votes
2 answers
URL fragment lost as part of SAML token authentication; workaround / standard pattern?
Several web application authentication protocols (like WS-Federation and the SAML protocol, i.e., so-called 'passive' protocols, and apparently also ASP.NET Forms authentication, see this StackOverflow question, and AppEngine, see this GWT bug…

MarnixKlooster ReinstateMonica
- 9,640
- 14
- 54
- 108
4
votes
2 answers
Retain Url Fragment within ReturnUrl in Forms Authentation under MVC
I have a scenario where I need to send the user to the login page, with the returnurl parameter populated with the page they're currently sitting on including a url fragment, so as when they complete login, they're redirected back to their original…

marcusstarnes
- 6,393
- 14
- 65
- 112
4
votes
0 answers
How to use #/fragment identifier with file:// URI/URL protocol
I'm trying to open local html files at specific anchors by using the #fragment identifiers, this unfortunately seems to be stripped by the file handler. For example running
cmd.exe /c rundll32 url.dll,FileProtocolHandler…

JacobP
- 561
- 3
- 21
3
votes
1 answer
How to scroll to a named anchor in WebView url?
I'm having a compatibility problems opening a locally stored page on a specific named anchor in Android'd WebView. Currently I'm using simply
webView.loadUrl("file:///android_asset/page.html#fragment");
which works fine on my 4.1 device but users…

Czechnology
- 14,832
- 10
- 62
- 88
2
votes
2 answers
Accessing Jump Links (the part of the URL after a hasch character, #) from the code behind
Anyone know if it's possible to access the name of a jump link in c# code?
I'm doing some url Rewriting stuff and I'm thinking I might not be able to see that part of the URL.
So basically, my URL looks a little something like…

Ev.
- 7,109
- 14
- 53
- 87
2
votes
1 answer
Is there a way to scroll to URI fragments without adding them to history?
I have some URI fragments in an app I'm building that will jump to elements within the page as expected, however, clicking on these fragment links also adds them to the history so if I navigate to another page and click back, it will navigate to the…

HaulinOats
- 3,628
- 4
- 21
- 24
2
votes
1 answer
FormsAuthentication.RedirectFromLoginPage - fragment not preserved on redirect
I have a page, URI looks like this:
http://domain.example.com/Profiles/Profile.aspx?username=blah#blahtab
When that fragment (#blahtab) is present, some jQuery picks up on that and displays a different section of the page initially.
However, that…

Broam
- 4,602
- 1
- 23
- 38
1
vote
1 answer
How to remove "#" in svelte spa router?
I use svelte-spa-router npm module for the router of my svelte project.
When using this module it adds "#" in the URL in default to denote it is the spa router.
Such as "localhost:5000/#/app/.." I want to remove this "#" and make the router as the…

mingxingwang
- 169
- 4
- 17
1
vote
0 answers
Can an URL fragment point to a HTML element that has no id?
I'd like to provide a link to an external page (not under my control) that has a specific part where I want it to point to (it's a license page with an appendix, and I want the link to go directly to the appendix).
I would normally do this with a #…

geekley
- 1,231
- 10
- 27
1
vote
0 answers
Fixing unescaped # in the URL with nginx
A bad HTTP client isn't escaping hash signs and is sending them to nginx, like so:
GET /foo/escaped#stuff
Instead of:
GET /foo/escaped%23stuff
This breaks my nginx configuration, since nginx strips the text after the # in the proxy_pass directive.…

Blender
- 289,723
- 53
- 439
- 496
1
vote
3 answers
CSS selector fragment support
Fragments (or hashes) in URL are widely used to specify some specific fragment in a document.
For example, the fragment below
http://example.com/page.pnp#
Usually references something like or

Vad
- 4,052
- 3
- 29
- 34