Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Sep 21, 2018
1 parent bddb70d commit e107cbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/js/traffic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e107cbb

Please sign in to comment.