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

Fixing the issue that requests may not be sent due to cache of fetch #36

Closed shihshen closed 3 years ago

shihshen commented 3 years ago

I finally figure out why some requests may not be sent out. Here is the reference. However, this fix does break 2 unit test cases. I can also try to fix the test cases if you prefer.

luciopaiva commented 3 years ago

Hmm, so it was a caching problem. Nice catch!

About the tests, no problem. I fixed them here. I am gonna close your PR in favor of the new one.

Which web server are you using to serve your script? Is it Web Server for Chrome or a custom one?

I never had cache problems with that app, so I believe you might be using a different server.

shihshen commented 3 years ago

I tried web server for chrome and node static. had the same issue with both.

luciopaiva commented 3 years ago

What's your OS?

shihshen commented 3 years ago

I am using Mac, however, one of my friends who is using windows and web server for chrome is having the same issue.