Hey,
I noticed that the clear urls addons was doing replaceState to replace the history. The problem is that by using some hardcoded state this is breaking websites.
Most recently this applied to the Firefox Profiler. Here is a typical example:
- Open some profile link, such as https://profiler.firefox.com/public/def4zbt1tyg8w0x7nkdtq8g7s6h3ad0ndz7jbzg/calltree/
- Change the panel at the bottom (for example click on "Flame Graph")
- Then press the back button;
=> The application crashes.
Indeed when changing the panel (and other actions too), the application does a pushState with the new state, and also changes the URL by serializing part of the state. If you're curious, here is the code responsible for this.
The problem is the application thinks that a proper state is present, and use it, and crashes. By using null instead, the application would use the information contained and serialized in the URL. If you're curious, here is the code responsible for this.
I believe this wasn't happening before, but happens now, because the new "recursive cleaning" will make the URL look different while before they were possibly looking the same.
Now I can find 2 solutions (not exhaustive, both could be used):
- as I suggest in the title, I'm not sure why we use this hardcoded state information, and I think that using
null would provide the same functionality and less breakage.
- do not clean history if the hostname stays the same -- we could probably accept that inside one hostname it's acceptable that websites use the history information.
Thanks
Hey,
I noticed that the clear urls addons was doing
replaceStateto replace the history. The problem is that by using some hardcoded state this is breaking websites.Most recently this applied to the Firefox Profiler. Here is a typical example:
=> The application crashes.
Indeed when changing the panel (and other actions too), the application does a
pushStatewith the new state, and also changes the URL by serializing part of the state. If you're curious, here is the code responsible for this.The problem is the application thinks that a proper state is present, and use it, and crashes. By using
nullinstead, the application would use the information contained and serialized in the URL. If you're curious, here is the code responsible for this.I believe this wasn't happening before, but happens now, because the new "recursive cleaning" will make the URL look different while before they were possibly looking the same.
Now I can find 2 solutions (not exhaustive, both could be used):
nullwould provide the same functionality and less breakage.Thanks