When using "Load unpacked extension". I have to pass a query string (eg ?v=\d+) to scripts included in the background page to break the cache.
Is there any way to disable this caching behavior?
When using "Load unpacked extension". I have to pass a query string (eg ?v=\d+) to scripts included in the background page to break the cache.
Is there any way to disable this caching behavior?
Maybe try keeping a file with an update number and when your users open the extension it detects the new update and clears the cache? You can add cache permission in the extension manifest like below:
"permissions": [
"browsingData",
],
Then in your extension clear the cache like so:
var callback = function () {
// Do something clever here once data has been removed.
};
var millisecondsPerWeek = 1000 * 60 * 60 * 24 * 7;
var oneWeekAgo = (new Date()).getTime() - millisecondsPerWeek;
chrome.browsingData.remove({
"since": oneWeekAgo
}, {
"appcache": true,
"cache": true,
"cookies": true,
"downloads": true,
"fileSystems": true,
"formData": true,
"history": true,
"indexedDB": true,
"localStorage": true,
"pluginData": true,
"passwords": true,
"webSQL": true
}, callback);