Javascript window.location.hash returns the value of URL that comes after “#”
For ex.
https://mundrisoft.com/tech-bytes/wp-admin/post-new.php#searchterm
window.location.hash will return “#searchterm” in browsers IE 11, Edge and Chrome and Mozilla
For an empty hash URL:
https://mundrisoft.com/tech-bytes/wp-admin/post-new.php#
window.location.hash will return
“#” -> Chrome, Mozilla, IE 11
“” -> Edge
So, keep this little trick for browser compatibility in mind next time you are using hash URL. 🙂