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.
Asked
Active
Viewed 214 times
1
-
As long as you are encoding, I don't see any problem there. – Ravi Sep 12 '17 at 18:14
1 Answers
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,736
- 8
- 59
- 96