3 ms·
Or website operators could stop embedding objects hosted by Google. GDPR protects users to some extent, but sites should protect themselves, too. The informat
by amluto 8y ago
Or website operators could stop embedding objects hosted by Google. GDPR protects users to some extent, but sites should protect themselves, too. The information available to hosts of embedded assets is quite valuable, especially when those assets are in the form of scripts, and sites should seriously consider monetizing that information themselves rather than just giving it away.
- crazygringo 8y agoExcept that a shared CDN which everyone uses results in better performance. For the popular fonts, a user probably already has them in their browser cache from other sites, so they load instantly. Having sites redundantly host identical font files separately is a step backwards for users, who wind up waiting longer for a page to load, or experiencing the jarring FOUT (Flash Of Unstyled Text).
- untog 8y agoRight, so it's a question of performance vs privacy. Which is a very legitimate debate.
- ocdtrekkie 8y agoIf everyone dumped their excess tracking JavaScript, but added locally-hosted fonts, the net difference would still be far superior performance to what the average user is used to. Or you could just use a selection of common system fonts, and not host any fonts at all.
- _wmd 8y ago> Except that a shared CDN which everyone uses results in better performance. This is thrown around a lot, but very rarely with hard numbers to support it. A cold DNS cache costs at least one roundtrip, a cold SSL session cache costs several, a new SSL connection (presently) costs at least 2. Meanwhile, all the above is necessary to talk to an origin site anyway, and networking performance for the best part of 10 years has been dominated by latency (i.e. roundtrips) rather than throughput. Hoping the user had an idle connection to the Google CDN when measuring cold request start is wishful thinking Meanwhile self-hosted reuses all of the above and enables assets to be combined into a single transaction, which vastly improves the behaviour of TCP cold start
- jve 8y agoMoreover, the browsers have a caching mechanism.
- legitster 8y agoThe caching happens browser level. Chrome won't bother opening a connection if it sees a URL it knows.
- exacube 8y agoFrom googling: https://www.keycdn.com/blog/web-font-performance/ https://www.keycdn.com/blog/web-font-performance/ Skip to "Here is a comparison of hosting Open Sans locally vs Google CDN." They found it was faster to use a Google CDN. One of the things this article suspects is that CDNs will have better world-wide coverage, and therefore overall latency, than hosting your font yourself. I'd like to see a comprehensive study of your counter point, though.
- _wmd 8y agoThis test was performed with a single client based in LA, and concluded the fastest font - Open Sans - downloaded in 476ms. The test fails to measure how much of this is setup time vs transfer time, or account for behaviour of TCP during the transfer. You will find, and I will measure this for you if you really want, that setup time absolutely dominates this cost. If setup time is amortized across all assets on a site, as it is when self-hosted, the true cost of the 220KiB font download will be vastly lower -- closer to 100ms assuming a sufficiently warm TCP connection over even an 8Mbit link, and significantly less again with faster links. As for browser-side caching, this is once again wishful thinking and there is no room for it in any kind of engineering discipline
- crazysim 8y agoDoes Google Fonts even use TCP? It might be HTTP2+QUIC.
- pdkl95 8y ago> "... hosting Open Sans locally vs Google CDN." Both of these are still a lot slower than simply installing the font in the OS (or browser) and loading out of the filesystem block cache (or using the already-loaded font in browser memory). Open Sans is Apache License 2.0, so it should be easy for browsers/OS to provide it as a standard font instead of merely the "web safe" set of fonts.
- kerkeslager 8y agoThere are better solutions to this problem which don't use CDNs. Particularly, using secure hashes of resources allows users to load the fonts from cache even if they're stored at different URIs, while preventing various hacks that can occur with a CDN.