I use @require
to load a local JavaScript file shared by some of my GreaseMonkey scripts. When I change the file, GreaseMonkey continues to use the original version and does not load the new version. How can I disable the caching of the @require
d file?
Asked
Active
Viewed 770 times
6

double-beep
- 5,031
- 17
- 33
- 41

user6507641
- 69
- 1
-
This question belongs to a Tampermonkey support site e.g. https://github.com/Tampermonkey/tampermonkey/issues or its forum. As for the problem, I believe TM updates external dependencies only once a day or even a week by default, there is a setting in the extension's dashboard. – wOxxOm Jun 24 '16 at 09:29
-
I am using GreaseMonkey. Is GreaseMonkey and TamperMonkey the same thing? – user6507641 Jul 21 '16 at 20:15
-
https://github.com/greasemonkey/greasemonkey/issues – wOxxOm Jul 21 '16 at 20:39
1 Answers
1
In TamperMonkey, file://
resources won't be cached. You should, however, enable access to file URLs at Chrome's extension management page:
The are other ways to prevent caching of @require
d files (source):
- Increase the version number and save the script. All resources will be reloaded.
- Set "Config mode" to "Advanced" in the Setting tab. Scroll to "Externals" and set the "Update Interval" to "Always". "Always" means after the resource was used, so you might need to execute/load the page twice.
- You can edit the external resources using the "Edit" button.

double-beep
- 5,031
- 17
- 33
- 41