From 6544ff5c56d61b131ba36c344127744740b05f87 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 18 Sep 2018 17:05:53 -0400 Subject: [PATCH] fix https://github.com/uBlockOrigin/uBlock-issues/issues/229 --- src/js/traffic.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index 40b6f460f..bc6229543 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -600,14 +600,17 @@ var onHeadersReceived = function(details) { // https://bugzilla.mozilla.org/show_bug.cgi?id=1376932 // Prevent document from being cached by the browser if we modified it, // either through HTML filtering and/or modified response headers. + // https://github.com/uBlockOrigin/uBlock-issues/issues/229 + // Use `no-cache` instead of `no-cache, no-store, must-revalidate`, this + // allows Firefox's offline mode to work as expected. if ( (filteredHTML || modifiedHeaders) && dontCacheResponseHeaders ) { let i = headerIndexFromName('cache-control', responseHeaders); if ( i !== -1 ) { - responseHeaders[i].value = 'no-cache, no-store, must-revalidate'; + responseHeaders[i].value = 'no-cache'; } else { responseHeaders[responseHeaders.length] = { name: 'Cache-Control', - value: 'no-cache, no-store, must-revalidate' + value: 'no-cache' }; } modifiedHeaders = true;