Page MenuHomePhabricator

Use data URLs instead of images for small icons
Closed, DeclinedPublic

Description

By using data URLs instead of images for small icons such as the one that appears next to external links, wouldn't it be possible to save many small but unnecessary web requests?

Event Timeline

Jdlrobson subscribed.

The external links icons are currently rendered in the main stylesheet for the page. This stylesheet is render blocking, so we try to keep this as minimal as possible as larger stylesheets lead to larger first paints. Loading them via HTTP requests, makes these load asynchronously so overall the page will load faster. Note if a page has multiple external links, the icon is only loaded via a single HTTP request (the others are cached). This decision dates back to a time where we noticed the image heavy mobile Minerva skin was slower than desktop and we carried this learning over to Vector 2022.

There is some additional background in T182648, T97289.

e.g. We could but we chose not to.

Does this answer your question?

Admin Note: the external link icons apply to all skins, so I'm retagging this accordingly as if we reconsider this, we'd need to think more holistically across all the skins.

Sure, makes sense, thanks for your time and answer!