Page MenuHomePhabricator

Don't include `noscript` module in client registry
Closed, ResolvedPublic


We currently include the noscript module in the client startup registry just like any other module. But, I think this one is special in that it should not be included in the registry, because it wouldn't make sense to load it with javascript - in any case you use javascript, the module is inapplicable. It has custom handling to be included as a <noscript> tag with a link to the load.php url with the source, rather than using mw.loader.implement (though if you manually set its state back to 'registered' and call mw.loader.load() it'll be added as normal css too).

By removing the module, we can reduce the startup registry size on all page views, which is especially great because on most wikis the noscript module is empty (global search says MediaWiki:Noscript.css only exists on ruwikiquote, testwiki, tgwiki, ruwiki, and eswiki).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle triaged this task as Low priority.EditedSun, Sep 26, 10:00 PM
Krinkle moved this task from Inbox to Accepted Enhancement on the MediaWiki-ResourceLoader board.
Krinkle added a subscriber: Krinkle.

Sounds good to me. I suggest using the noscript group as the filter condition (rather than the exact module name). Take a look at StartupModule where the target and origin filters exist, it can probably go near there in the same manner. We'd also want to verify it with a test case. Triaing as Low priority since it would reduce under 10 bytes from the manifest and we have bigger fish in store, including ones you are already working on such as TimedMediaHandler. There is also T253582 for example.

Change 724118 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] resourceloader: omit `noscript` module from client registry

Change 724118 merged by jenkins-bot:

[mediawiki/core@master] resourceloader: omit `noscript` module from client registry