mirror of https://github.com/gorhill/uBlock.git
This commit is contained in:
parent
bddb70da75
commit
e107cbb370
|
@ -44,6 +44,7 @@ var µBlock = (function() { // jshint ignore:line
|
|||
autoUpdatePeriod: 7,
|
||||
cacheStorageCompression: true,
|
||||
debugScriptlets: false,
|
||||
cacheControlForFirefox1376932: 'no-cache, no-store, must-revalidate',
|
||||
ignoreRedirectFilters: false,
|
||||
ignoreScriptInjectFilters: false,
|
||||
manualUpdateAssetFetchPeriod: 500,
|
||||
|
|
|
@ -605,12 +605,13 @@ var onHeadersReceived = function(details) {
|
|||
// allows Firefox's offline mode to work as expected.
|
||||
if ( (filteredHTML || modifiedHeaders) && dontCacheResponseHeaders ) {
|
||||
let i = headerIndexFromName('cache-control', responseHeaders);
|
||||
let cacheControl = µb.hiddenSettings.cacheControlForFirefox1376932;
|
||||
if ( i !== -1 ) {
|
||||
responseHeaders[i].value = 'no-cache';
|
||||
responseHeaders[i].value = cacheControl;
|
||||
} else {
|
||||
responseHeaders[responseHeaders.length] = {
|
||||
name: 'Cache-Control',
|
||||
value: 'no-cache'
|
||||
value: cacheControl
|
||||
};
|
||||
}
|
||||
modifiedHeaders = true;
|
||||
|
|
Loading…
Reference in New Issue