You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
History cleaner: consider replacing the state with null instead of { state: "cleaned_history" } for better compatibility #196
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:
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.
I am building an app and was getting this issue too. I agree that both solution 1 and 2 are better than the current behaviour. Of course, for my app to work as intended, I'd prefer solution 2.
Activity
evertheylen commentedon Jul 23, 2022
I am building an app and was getting this issue too. I agree that both solution 1 and 2 are better than the current behaviour. Of course, for my app to work as intended, I'd prefer solution 2.
Fixes ClearURLs#196
KevinRoebert commentedon May 10, 2023
Fixed by 14a0832