diff --git a/src/js/background.js b/src/js/background.js index 8f4a70a93..37dff9d9f 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -43,6 +43,7 @@ const µBlock = (function() { // jshint ignore:line autoCommentFilterTemplate: '{{date}} {{origin}}', autoUpdateAssetFetchPeriod: 120, autoUpdatePeriod: 7, + cacheStorageAPI: 'unset', cacheStorageCompression: true, cacheControlForFirefox1376932: 'no-cache, no-store, must-revalidate', debugScriptlets: false, diff --git a/src/js/cachestorage.js b/src/js/cachestorage.js index 64fa9287c..6e333af5c 100644 --- a/src/js/cachestorage.js +++ b/src/js/cachestorage.js @@ -48,9 +48,12 @@ // https://github.com/uBlockOrigin/uBlock-issues/issues/328 // Use IndexedDB for Chromium as well, to take advantage of LZ4 // compression. + // https://github.com/uBlockOrigin/uBlock-issues/issues/399 + // Revert Chromium support of IndexedDB, use advanced setting to force + // IndexedDB. if ( vAPI.webextFlavor.soup.has('firefox') === false && - vAPI.webextFlavor.soup.has('chromium') === false + µBlock.hiddenSettings.cacheStorageAPI.toLowerCase() !== 'indexeddb' ) { // In case IndexedDB was used as cache storage, remove it. indexedDB.deleteDatabase(STORAGE_NAME); diff --git a/src/js/storage.js b/src/js/storage.js index c02bf557e..52b3eef6f 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -186,9 +186,10 @@ vAPI.localStorage.setItem( 'immediateHiddenSettings', JSON.stringify({ + cacheStorageAPI: this.hiddenSettings.cacheStorageAPI, disableWebAssembly: this.hiddenSettings.disableWebAssembly, suspendTabsUntilReady: this.hiddenSettings.suspendTabsUntilReady, - userResourcesLocation: this.hiddenSettings.userResourcesLocation + userResourcesLocation: this.hiddenSettings.userResourcesLocation, }) ); };