diff --git a/src/js/assets.js b/src/js/assets.js index 07700f073..f41300a14 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -69,8 +69,16 @@ api.fetchText = function(url, onLoad, onError) { // https://github.com/gorhill/uBlock/issues/2592 // Force browser cache to be bypassed, but only for resources which have // been fetched more than one hour ago. + // + // https://github.com/uBlockOrigin/uBlock-issues/issues/682#issuecomment-515197130 + // Provide filter list authors a way to completely bypass + // the browser cache. if ( isExternal ) { - const queryValue = `_=${Math.floor(Date.now() / 3600000) % 12}`; + const cacheBypassToken = + µBlock.hiddenSettings.updateAssetBypassBrowserCache + ? Math.floor(Date.now() / 1000) % 86400 + : Math.floor(Date.now() / 3600000) % 12; + const queryValue = `_=${cacheBypassToken}`; if ( actualUrl.indexOf('?') === -1 ) { actualUrl += '?'; } else { diff --git a/src/js/background.js b/src/js/background.js index d38724349..68a7fed24 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -58,6 +58,7 @@ const µBlock = (function() { // jshint ignore:line selfieAfter: 3, strictBlockingBypassDuration: 120, suspendTabsUntilReady: 'unset', + updateAssetBypassBrowserCache: false, userResourcesLocation: 'unset', };