1

I have a single page web app, I thought it would be a good idea to put some additional information for the user in browser url bar (in that case, which site he uses through my app). Something like myapp.com/#site=localhost/test Can I use it unencoded? I mean I know I can, but is it correct and are there any hidden pitfalls with it? Encoding the slash wouldn't look pretty and miss the point.

Maciej Krawczyk
  • 12,119
  • 5
  • 42
  • 54

1 Answers1

2

Yes, per RFC-3986, / is a valid character in a URL fragment. See List of valid characters for the fragment identifier in an URL?

Community
  • 1
  • 1
ykaganovich
  • 14,344
  • 8
  • 57
  • 91