0

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.

unor
  • 92,415
  • 26
  • 211
  • 360
Silencer310
  • 862
  • 2
  • 8
  • 25

2 Answers2

2

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.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
0

It's used for page reloading with a hash.

See Mozillas window.location for more information.

Simon
  • 23
  • 6