I've seen few URLs of the form
www.example.com/#/bar/1
How would this URL be interpreted? As far as I know the #
represents a fragment of the page, but here it looks completely different.
I've seen few URLs of the form
www.example.com/#/bar/1
How would this URL be interpreted? As far as I know the #
represents a fragment of the page, but here it looks completely different.
Note that this is not a URL, as it misses a scheme. I’m assuming you mean http
(or https
), so the URL would be
http://www.example.com/#/bar/1
The (first) #
starts the fragment identifier component.
So /bar/1
is the fragment of that URL. (The /
is allowed in a fragment; see a list of all allowed characters in the fragment identifier component.)
It’s up to the site if and in which way to make use of this fragment. Commonly this URL design is used by sites that serve the content via JavaScript.
It's used for page reloading with a hash.
See Mozillas window.location for more information.