Add-ons • Re: Working on a Greasemonkey fork for Pale Moon
I think I found a bug (or is it a feature?). Say I have a user script that executes for a particular URL, then I navigate to another page and then right back with the back button so that the browser loads old page from the cache. In this case, the script is executed again.
In case of old.reddit.com login form redirection fix, this results in another login form being added on the page you're returning to.
Also works with simple script that just calls alert(), alert is then shown again when navigating back.
If I'm not mistaken, back-forward cache is meant to restore JavaScript state as well, so such script should be considered already executed and not run again.
That's a feature, not a bug. It was also added in Violentmonkey version 2.12.8 and in Tampermonkey, albeit I don't exactly know the version that it was added in Tampermonkey, but he commented that it's an intended feature on his extension.
Wouldn't it make more sense for a userscript to still work, when you navigate to a website that a particular userscript should work in it, even when it's navigated through the browser cache?!
Discussion in the ATmosphere