It seems after calling history.pushState, window.location.pathname doesn’t get changed (at least in Safari). Any way to get the changed pathname? I currently just keep track of it in a global var.
It seems after calling history.pushState, window.location.pathname doesn’t get changed (at least in Safari). Any
Share
You could try storing the current url in the stateObj
This works, but you have to make sure you replace the current state on first page load to update with the current url.