How do I clear the hash portion of the URL

  • Thread starter Thread starter Rohit Gupta
  • Start date Start date
R

Rohit Gupta

The user is sent a url with a hash portion

Code:
example.com#xxx=yyy

I am doing this in JavaScript, but it's not clearing the hash portion.

Code:
window.history.replaceState(null, '', window.location.pathname + window.location.search);

Continue reading...
 
Back
Top Bottom