5 ms·
I started with replaceState only, but later I realized there was no specific gain that I was having (other than slightly good looking string without hash). This
by jaip 14y ago
I started with replaceState only, but later I realized there was no specific gain that I was having (other than slightly good looking string without hash). This method also suffers from reload and favicon flashes. If it reliably doesn't log to history (unlike location.replace()), using it could be a good idea. But that also comes with a tradeoff of older browser support issues, which requires using external javascript APIs.
- mmahemoff 14y agoI see. Surprised to learn there were still issues as replaceState() (as with pushState) is purely a transformation in the URL path. There's no reload and no update of the favicon link tag. Makes me wonder if that's a browser bug you saw.
- georgefox 14y agoWhat about detecting replaceState support and falling back to location.replace if necessary?