Page MenuHomePhabricator

Site logos preloaded but unused on mobile sites
Closed, ResolvedPublic

Description

When using the mobile sites in Chrome, I get the following warnings:

The resource https://en.m.wikipedia.org/static/images/project-logos/enwiki.png was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource https://commons.m.wikimedia.org/static/images/project-logos/commonswiki.png was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

etc.

Event Timeline

kaldari created this task.Oct 7 2020, 8:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2020, 8:08 PM
kaldari updated the task description. (Show Details)Oct 7 2020, 8:09 PM
Jdlrobson triaged this task as High priority.Oct 13 2020, 5:17 PM
Jdlrobson added a project: Performance-Team.

Seems high, but not 100% sure where those images prefetches are defined.

Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.

They come along with the same code that emits the CSS rules for it, SkinModule. Likely a feature option isn't fully disabled or accidentally enabled.

Gilles added a subscriber: Gilles.Oct 13 2020, 6:51 PM
Jdlrobson moved this task from Needs triage to MinervaNeue on the Mobile board.Oct 23 2020, 5:40 PM

This is an issue with ResourceLoader. A header Link: <https://en.wikipedia.org/static/images/project-logos/enwiki.png>;rel=preload;as=image is being incorrectly added to all modules using ResourceLoaderSkinModule regardless of whether the logo feature has been disabled.

For example it can be seen as a header on this URL:
https://en.wikipedia.org/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.echo.styles.badge%7Cext.uls.interlanguage%7Cext.wikimediaBadges%7Cmediawiki.skinning.interface%7Cmobile.init.styles%7Coojs-ui.styles.icons-alerts&amp;only=styles&amp;skin=apioutput

They come along with the same code that emits the CSS rules for it, SkinModule. Likely a feature option isn't fully disabled or accidentally enabled.

Minerva's modules are opt-out so specifically, turn off the logo feature in ResourceLoaderSkinModule by not including it.

Krinkle closed this task as Resolved.Mon, Nov 2, 9:53 PM
Krinkle reassigned this task from ovasileva to CCicalese_WMF.
Krinkle added a subscriber: ovasileva.

Change 634828 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Only preload logo in SkinModule for 'logo' feature

https://gerrit.wikimedia.org/r/634828

Fixed by Cindy meanwhile and will naturally benefit MobileFrontend when rolled out.