This commit is contained in:
Raymond Hill 2018-09-21 09:16:46 -04:00
parent bddb70da75
commit e107cbb370
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 4 additions and 2 deletions

View File

@ -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,

View File

@ -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;