luciopaiva / witchcraft

Inject Javascript and CSS right from your file system. Think GreaseMonkey for more advanced users.
https://luciopaiva.com/witchcraft
MIT License
254 stars 18 forks source link

Cannot remove once added script even after deleting file #43

Closed steinhaug closed 2 years ago

steinhaug commented 3 years ago

I am running witchcraft v2.6.1, and there is a cache problem. Right now I have deleted the js files but they are still added to the page. If I enter the page in normal chrome, the plugin window states server running however no files are included - but they are.

If I open ingognito window, plugin window says files are added and they are. Problem is I have deleted them, and if I click the link from the plugin window I correctoly get a page with 404 as it doesnt exist a file.

So why can this still be included ? There must be some sort of cache somewhere thats been enabled ? I didnt touch chrome in any way, so not sure where to look. I restarted chrome several times but same result. I double checked my file server but it serves the files correctly - only that your plugin magically inserts code from files that doesnt exist anymore.

steinhaug commented 3 years ago

I found sollution, when going into the extensions page in chrome I see on the extension there is a link to "background.html" which opens a devtools window. From this window I see that the files are indeed cached by chrome for some reason - by righty clicking in the "network" tab on the file I had problem with cache was removed and file gone.

Phuh! Not sure why chrome suddenly started to cache theese - never did that before.

luciopaiva commented 2 years ago

Hey @steinhaug,

That's very strange indeed! I tried to reproduce it here by removing the script I've just wrote to help answer your question on the other issue you opened, but I couldn't see any cache issues whatsoever. I just refreshed the page and the script was really gone and not executed.

Glad that you solved it, anyway!