Addon
Addon copied to clipboard
CleanURLs breaks the History API
I noticed this bug while working on my website.
If you do
history.pushState({something:"value"}, "", newURL)
and then press the back button, normally the window.onpopstate
function gets called with an event, and you can get the state (first parameter in the code above) with event.state and you can get the value of something
from there.
When CleanURLs is enabled, however, that original value is lost and I just get a generic state without the information needed to actually go back to the previous state in my code.
I don't know if this is intentional or not but I imagine it breaks virtually every site using that API.
I forgot to mention: I'm using Librewolf, a Firefox-based browser.