mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
revised fix for https://github.com/uBlockOrigin/uBlock-issues/issues/229
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
Block a user