I think that pushState
and the other History API methods are so nascent that standards haven't yet evolved. As opens a recent W3 work on Repurposing the Hash Sign for the New Web:
The Hash sign (#) in a URI was originally used to introduce a static
"fragment identifier", but recently it is being used in many more
complex ways as it is set by and interpreted by JavaScript in Web
applications.
It might violate normal behavior to use double slashes in the pathname but the hash fragment can be any arbitrary string. Do a typeof
and you'll see it's just a normal string. It's not standard and therefore might alienate the typical user experience. Code wise, however, I think you can feel free to you double slashes, triple slashes, or anything else.
One thing to keep in mind is that escaped characters are decoded when read from the window.location.hash
property.