After removing hash from URL using window.location.hash=''
page getting reloaded in firefox.
EDIT
Example:
wwww.Mysite.come/#page=1
On a click of button I am removing hash value using following code
window.location.hash=''
After removing the hash page is getting reloaded in firefox.
I don't want to reload page I just want to remove hash from URL
How to fix it?
Just in case somebody else is still looking for a solution to this. Try this when the page loads.
history.pushState("", document.title, window.location.pathname);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With