If a gadget has no styles it is included in the URL in the head of the document. If a skin has no top loaded styles this can result in an unnecessary HTTP request for an empty file.
Steps to demonstrate:
- Visit https://en.m.wikipedia.org/wiki/Barack_Obama in an incognito window as an anon
- view source
Note the link tag:
<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=ext.gadget.switcher%7Cext.gather.menu.icon%7Cmediawiki.raggett%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%7Cskins.minerva.tablet.styles&only=styles&skin=minerva&target=mobile" />
See [[ https://en.m.wikipedia.org/w/load.php?debug=false&modules=ext.gadget.switcher | ext.gadget.switcher ]]is present.
In Vector we load the following styles for gadgets:
https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.gadget.DRN-wizard%2CReferenceTooltips%2CWatchlistBase%2CWatchlistGreenIndicators%2Ccharinsert%2Cfeatured-articles-links%2CrefToolbar%2Cswitcher%2Cteahouse&only=styles&skin=vector
Issues:
- Many of these do not seem vital to top load
- Some of these e.g. https://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.gadget.DRN-wizard&only=styles&skin=vector have no styles despite being included in the request