I have URL like: http://example.com#something, how do I remove #something, without causing the page to refresh?
http://example.com#something
#something
I attempted the following
(Too many answers are redundant and outdated.) The best solution now is this:
history.replaceState(null, null, ' ');