From: Ori Livneh Date: Wed, 10 Feb 2016 08:25:41 +0000 (-0800) Subject: resourceloader: Disable localStorage cache on FF, Opera X-Git-Tag: 1.31.0-rc.0~8026^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=74f0088ebcbaad11a7dd8bcc138c136921595fbf;p=lhc%2Fweb%2Fwiklou.git resourceloader: Disable localStorage cache on FF, Opera Bug T66721 affects a minority of users on a minority of browsers. But for those people, the effect is sufficiently severe to be considered a deal-breaker. I regret that it has taken me this long to come around to recognizing that. Bug: T66721 Change-Id: Iedde8a399c1eec81ed6307748048b3c1bdfe7adc --- diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index 90b93dceee..2aada9e66f 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -2034,10 +2034,7 @@ // Whether the store is in use on this page. enabled: null, - // Modules whose string representation exceeds 100 kB (30 kB on FF) are - // ineligible for storage due to bug T66721. The quota is stricter on - // Firefox due to . - MODULE_SIZE_MAX: ( /Firefox/.test( navigator.userAgent ) ? 30 : 100 ) * 1000, + MODULE_SIZE_MAX: 100 * 1000, // The contents of the store, mapping '[module name]@[version]' keys // to module implementations. @@ -2108,8 +2105,15 @@ return; } - if ( !mw.config.get( 'wgResourceLoaderStorageEnabled' ) ) { + if ( + // Disabled because localStorage quotas are tight and (in Firefox's case) + // shared by multiple origins. + // See T66721, and . + /Firefox|Opera/.test( navigator.userAgent ) || + // Disabled by configuration. + !mw.config.get( 'wgResourceLoaderStorageEnabled' ) + ) { // Clear any previous store to free up space. (T66721) mw.loader.store.clear(); mw.loader.store.enabled = false;