Questions tagged [url-fragment]

URL fragments are the part of the URL that appears after the hash(#) character. Fragments are never sent to the server as part of the URL request. Use with the [url] tag.

In URLs, a fragment is what appears after the # character

https://www.example.com/directory?query_string#url_hash

Fragments were originally used to force a browser to scroll to a specific id. For instance https://www.example.com#scroll-to-me would scroll to the div below in an document

<div id="scroll-to-me">Some content</div>

As browsers create a history event every time the hash changes, the URL fragment has become a programming tool unto itself. This data is not sent from the client to the server, however, so if you want to store data there, or interact with it, you must use .

See also

32 questions
0
votes
1 answer

cURL offers an option to add the URL-fragment?

There are an option -d to append data as parameters at URL of GET, so I'm imagining that exists also an option to add the URL fragment (# "URL hash"). PS: no clues by curl --help | grep -i frag.
Peter Krauss
  • 13,174
  • 24
  • 167
  • 304
-1
votes
1 answer

Hash refresh in Javascript

I'm almost done with my previous issue, but now I'm dealing with something more subtle and annoying. I've got a page with some links like these ones: First content Second content In the page…
Andrea Carta
  • 33
  • 1
  • 5
1 2
3