javascript - Is it possible to force the browser to reload the same page with a hash? -
this question has answer here:
- javascript reload page hash value 8 answers
i know can add hash end of url so:
window.location.hash = '#myfancyhash';
but various reasons need reload page. on browsers works fine:
window.location = window.location.href + '#myfancyhash';
but others refuse reload page since sees new url hash version.
is there way force browsers redirect (reload) page anew?
window.location.hash = '#myfancyhash'; window.location.reload()
this cause reload new hash
Comments
Post a Comment