If Fresh URL is used on a page where some other script expects to be able to manage history.state, said script will not be in for a good time. As is, Fresh URL overwrites history.state to be {} when updating the URL to the freshened version. Minimal repro: https://fresh-url-replacestate-testing.glitch.me/
This PR makes it keep history.state intact.
My understanding is that Fresh URL's intention is to only change the visible URL, and not the underlying state object, so this change shouldn't impact Fresh URL's desired functionality.
If Fresh URL is used on a page where some other script expects to be able to manage
history.state
, said script will not be in for a good time. As is, Fresh URL overwriteshistory.state
to be{}
when updating the URL to the freshened version. Minimal repro: https://fresh-url-replacestate-testing.glitch.me/This PR makes it keep
history.state
intact.My understanding is that Fresh URL's intention is to only change the visible URL, and not the underlying state object, so this change shouldn't impact Fresh URL's desired functionality.