DEV Community

Discussion on: Time to Say Goodbye to Google Fonts: Cache Performance

Collapse
 
yellow1912 profile image
yellow1912 • Edited

So you still use google font, you only download them to your server right? What is the performance benefit here? Even the article you pointed to concluded that hosting google font locally does not yield any benefit. I can even argue that google connection can be faster than your own server in some cases.

The only thing that you can save is dns connect time which can be helped partially with preconnect. As stated in the article you linked yourself, google also has some nice tweaks built in on their server to detect and serve fonts better for users. Wouldn't it be way more complicated to do it yourself?

Collapse
 
zwacky profile image
Simon Wicki

Hey yellow, I now updated the post. Thanks again and sorry for the confusion.

Collapse
 
zwacky profile image
Simon Wicki

Hey yellow, I apologise I messed up the links 🙈. I still had it in my research list of not "enough data to back it up". Thanks for pointing this out, I will update it immediately!

Collapse
 
yellow1912 profile image
yellow1912

Thank you. I'm very interested in all these performance topics. Do you see real improvement hosting your own fonts? Do you measure impacts with users using various browsers and devices?

On this article in your post, the wp rocket team seems to dismiss the idea that local fonts are faster. wp-rocket.me/blog/self-hosting-goo...

Thread Thread
 
zwacky profile image
Simon Wicki • Edited

I'm very interested in these topics as well!

In the wp-rocket blog post, all replies disagree with the author in the comment section. The author also compares Google Fonts with CDN to self hosted fonts for repeated usage, which is comparing apples with pears.
Adding a CDN for your static assets like self-hosted fonts improves performance, definitely. Therefore I wouldn't compare this.

The benchmark data on the wp-rocket blog post never made any sense to me either: in one network chart I can clearly see that self-hosted fonts is being requested faster than the Google Fonts network chart. But the document-ready signal is later initiated, which could mean that their implementation of self-hosted fonts are blocking the render, whereas the Google Fonts use font-display swap.
You see, so many assumptions and questions that I rather not trust that data.

Sorry again for bringing that link into the conversation.

I guess I'd better follow up with a clean benchmark post myself! :)