javascript - Is it possible to force the browser to reload the same page with a hash? -


this question has answer here:

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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -