On loading a page I would like it to go to #content
without changing the url.
I thought I would be able to use
window.location.hash = "content";
window.location.replace("#content", "");
but #content
still exists on the url.
Any better method?
Edit:
Also tried
window.location.hash = "content";
window.location.replace(window.location.toString().replace("#content", ""));
But this sends the browser into a loop.