Is an HTML hash/anchor allowed to contain a #? Like if I go to website/file.html#one#two and that reads `window.location.hash` from Javascript will it be the string "one#two"?

Imagine I am using # to fake "arguments" to a Javascript application, like the ?arg1=1&arg2=2 in CGI. So for example

website/file.html#arg1=1#arg2=2

or possibly

website/file.html#arg1=1&arg2=2

Which of the above separator conventions seems more natural to you?

Follow

@mcc I'd use the exact same format as query string ad pass it into the URLSearchParams class to parse. Easier to parse, construct, modify that way.

developer.mozilla.org/en-US/do

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.