I have a problem. How can I remove from url content added by history.pushState? For example, I have this url:
site.com
Ok, now I am updating this url:
site.com/site/subsite
How can I restore the default URL (site.com).
I try history.pushState("",document.title,document.location.pathname) , but
document.location.pathname - "site.com/site/subsite"
and I will return to the starting point: (
source share