I have a page foo.html with a lot of named anchors. The user jumps from #anchor1 to #anchor2 etc. But when the user reloads the page I want only foo.html to load and not foo.html#anchorX. Also when the user hits the back button, they should be taken to the page they were on before foo.html and not back to the last anchor. Can this be done?
location.replace()
takes care of the back button. But it does not solve the reload problem.