Is it safe to use window.history.replaceState() in <head>?
I'd like to remove the #_=_ artefact that Facebook adds to URLs when a user logs in on my website. I'm using this script: if (window.location.hash === '#_=_') { const uri = window.location.toString(); const withNoHash = uri.substring(0, uri.indexOf('#')); window.history.replaceState({}, document.title,…