'wgCaseSensitiveNamespaces' => $caseSensitiveNamespaces,
'wgLegalTitleChars' => Title::convertByteClassToUnicodeClass( Title::legalChars() ),
'wgIllegalFileChars' => Title::convertByteClassToUnicodeClass( $illegalFileChars ),
- 'wgResourceLoaderStorageEnabled' => $conf->get( 'ResourceLoaderStorageEnabled' ),
'wgForeignUploadTargets' => $conf->get( 'ForeignUploadTargets' ),
'wgEnableUploads' => $conf->get( 'EnableUploads' ),
'wgCommentByteLimit' => null,
'$VARS.maxQueryLength' => ResourceLoader::encodeJsonForScript(
$conf->get( 'ResourceLoaderMaxQueryLength' )
),
+ // The client-side module cache can be disabled by site configuration.
+ // It is also always disabled in debug mode.
+ '$VARS.storeEnabled' => ResourceLoader::encodeJsonForScript(
+ $conf->get( 'ResourceLoaderStorageEnabled' ) && !$context->getDebug()
+ ),
'$VARS.storeKey' => ResourceLoader::encodeJsonForScript( $this->getStoreKey() ),
'$VARS.storeVary' => ResourceLoader::encodeJsonForScript( $this->getStoreVary( $context ) ),
];
}
if (
+ !$VARS.storeEnabled ||
+
// Disabled because localStorage quotas are tight and (in Firefox's case)
// shared by multiple origins.
// See T66721, and <https://bugzilla.mozilla.org/show_bug.cgi?id=1064466>.
- /Firefox/.test( navigator.userAgent ) ||
-
- // Disabled by configuration.
- !mw.config.get( 'wgResourceLoaderStorageEnabled' ) ||
-
- // Disable module store in debug mode context
- mw.config.get( 'debug' )
+ /Firefox/.test( navigator.userAgent )
) {
// Clear any previous store to free up space. (T66721)
this.clear();