In order to keep track of AJAX changes on a webpage, I will be constantly adding to or changing the hash fragment. Is it valid to append a hash to a URL without adding a question mark first?
Example:
http://www.mysite.com#thisisthehash
Yes - it is perfectly valid for URLs to have a fragment identifier (denoted by a hash) without a querystring (denoted by a question mark).
As RFC-3986 shows, both the query and fragment parts are optional and unrelated in terms of their optionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With