A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gorhill/uBlock/commit/52925ba2f9ed4351c0f5c7420773d2f59557fc7d below:

Support disabling advanced setting `cacheControlForFirefox1376932` · gorhill/uBlock@52925ba · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+8

-6

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+8

-6

lines changed Original file line number Diff line number Diff line change

@@ -483,14 +483,16 @@ const onHeadersReceived = function(details) {

483 483

// Use `no-cache` instead of `no-cache, no-store, must-revalidate`, this

484 484

// allows Firefox's offline mode to work as expected.

485 485

if ( (filteredHTML || modifiedHeaders) && dontCacheResponseHeaders ) {

486 -

let i = headerIndexFromName('cache-control', responseHeaders);

487 486

let cacheControl = µb.hiddenSettings.cacheControlForFirefox1376932;

488 -

if ( i !== -1 ) {

489 -

responseHeaders[i].value = cacheControl;

490 -

} else {

491 -

responseHeaders.push({ name: 'Cache-Control', value: cacheControl });

487 +

if ( cacheControl !== 'unset' ) {

488 +

let i = headerIndexFromName('cache-control', responseHeaders);

489 +

if ( i !== -1 ) {

490 +

responseHeaders[i].value = cacheControl;

491 +

} else {

492 +

responseHeaders.push({ name: 'Cache-Control', value: cacheControl });

493 +

}

494 +

modifiedHeaders = true;

492 495

}

493 -

modifiedHeaders = true;

494 496

}

495 497 496 498

if ( modifiedHeaders ) {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4