2 ms·
Serious question: Why the hell do all modern browsers not come with all of these fonts bundled in, like they do with CA certificates? Google Fonts and all the
by sneak 5y ago
Serious question: Why the hell do all modern browsers not come with all of these fonts bundled in, like they do with CA certificates?
Google Fonts and all the free fonts that ship in Debian/Ubuntu are as close to a de facto standard as anything on the internet. Why not just lazy load them on first launch of a browser (or first use on a webpage) and cache them forever?
- systoll 5y agoOn use, the font files are cached for a year. Until relatively recently, that cache would’ve been shared across all sites, so it almost worked the way you described. Now, the cache is per-site.[1] The arguments for partitioning the cache apply to fonts just as much as to other resources. There have been thoughts[2] and proposals[3] around ways to make shared libraries without running into those issues, but nothing has really materialised AFAIK. The broad issue is that 'just lazy load on first use' creates privacy reasons, and the idea of picking a list of popular resources to cache on launch never really goes anywhere. [1]: https://developers.google.cn/web/updates/2020/10/http-cache-partitioning?hl=zh-cn https://developers.google.cn/web/updates/2020/10/http-cache-... [2]: https://hillbrad.github.io/sri-addressable-caching/sri-addressable-caching.html https://hillbrad.github.io/sri-addressable-caching/sri-addre... [3]: https://www.youtube.com/watch?v=cBY3ZcHifXw https://www.youtube.com/watch?v=cBY3ZcHifXw