Live data from Hacker News

Self-host your fonts for better performance

wicki.io

21–30 of 417 posts

Re: Self-host your fonts for better performance

#23
I've always wondered the legality of downloading web fonts from Google Fonts and self-hosting them.

At first glance it probably doesn't sound like a problem, I get it's effectively the same as serving them from Google, but I know fonts can also sometimes have strange licensing requirements… so I always figured it was safer just to avoid it entirely.

Re: Self-host your fonts for better performance

#24
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

If you want a really fast web experience, try disabling images and javascript too!

(on rereading this I sounded sarcastic, but I really wasn’t trying to be)

Re: Self-host your fonts for better performance

#25
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

I've had this as well for quite some time in uBlock Origin - and it works great. Most websites don't need custom fonts, and uBO remembers the ones where I re-enable them back.

Re: Self-host your fonts for better performance

#26
post #23

I've always wondered the legality of downloading web fonts from Google Fonts and self-hosting them. At first glance it probably doesn't sound like a problem, I get it's effectively the same as serving them from Google, but I know fonts can also sometimes have strange licensing requirements… so I always figured it was safer just to avoid it entirely.

I have yet to see anyone independently verify this, but to me it seems that Google fonts sends different versions of fonts, depending on the user agent.

Downloading a font and using it on a different operating system from where the original download comes from seems to make the font look... unusual?

Re: Self-host your fonts for better performance

#27
post #4

A question: instead of redownloading the same resources again and again, can we achieve privacy by adding delay between requesting a resource and providing it? It could be the same amount of time it took downloading it the first time or some randomized value. It won't speed up pages, but at least will save from bandwidth and data caps.

This happens somewhat by ensuring that timing APIs in Javascript don't have very high accuracy. But these attacks have gotten more sophisticated over time, and any random noise can be filtered out.

Re: Self-host your fonts for better performance

#28

I never understood why browsers don't ship with more fonts, especially Chrome.

I'd say that it could be done one step further, even: a package in, or part of, the OS, that simply installs the 100 (or ten, I don't know the usage curves) most common fonts and keeps them updated.

Re: Self-host your fonts for better performance

#29
Something similar I did a few days ago:

Before: https://www.webpagetest.org/result/201129_Di8J_c734f3b630a33...

After: https://www.webpagetest.org/result/201201_DiG4_230670b40ea6e...

While I'm still using Google Fonts, I inlined all the @font-face declarations into my own CSS files, and was then able to remove the tag (a blocking resource) in the head of the document. Lazy loading images also helped, and using webm for video.

Re: Self-host your fonts for better performance

#30
post #5

I'm usually the first one to sneer in disbelief at super users who 'go nuclear' and disable the likes of javascript and images when browsing the web, but lately, I've been experimenting with having custom fonts disabled (that is, fonts I don't have locally), and it feels to me that page loads are much faster, and in some case more readable (pages feel 'cleaner'?). The only issues I've come across so far is when a sit…

Web fonts are a big one in terms of making various websites feel fast because, when implemented incorrectly, they massively slow down initial text paint.

With that said, they're a fantastic feature but are also way overused. You don't need web fonts unless your website is either heavily type-centric, or has font-related dependencies (such as embedded content of some kind). Icon fonts are also a neat use of web fonts, but they don't make the page "feel slow" when their rendering is slow, because icons loading slower affects our perception of a page's loading time less than its text.

Post reply on HN