Is there a function that can be called to prevent the browser from recording a back history entry when changing the hash value?
I am writing a simpl
window.location.replace will let you set the url without adding it to the browser history.
window.location.replace
var baseUrl = window.location.href.split('#')[0]; window.location.replace( baseUrl + '#' + imageID );
documentation