Live data from Hacker News

Self-host your fonts for better performance

wicki.io

201–210 of 417 posts

Re: Self-host your fonts for better performance

#201
post #194
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 HATED sites that used custom fonts when I lived in the country. There are only two ways loading such a site goes: a) you get to stare at a blank page for a couple minutes while the font downloads, if it downloads at all. (this seemed to be google's favorite way to screw over people with bad connections; acknowledgment that it's going to suck and doing it anyway) b) you get two minutes into reading the page only for…

Re: (b): I know there’s a MathJax clone that works around the constant reformatting by precalculating the sizes of the various blocks and putting that into the HTML. So your browser basically makes a big empty placeholder box that the renderer will render into.

It’d be neat if something like that were available for web fonts. Each paragraph gets its own “block” that the installed font uses (and contains padding), and when the font downloads, it won’t reflow. But I’d assume it’d be way too complicated to deal with (different screen widths is the first to come to mind).

Re: Self-host your fonts for better performance

#202

Maybe I'm being naïve, but why don't browsers ship with more popular fonts bundled to avoid problems like these? I have no issue with any of my browsers taking up fractionally more space for an extensive cache of the most popular web fonts when the payoff is better performance on so many sites. Of course, servers should still be capable of serving the fonts that the client requires to render the content correctly, bu…

e.g. Chrome could ship with the Google fonts. Would improve the experience of something like 50% of web users.

Re: Self-host your fonts for better performance

#203

It's infuriating to see so much web tech being discarded created during the 90s and 00s in good faith, just because the web was subverted into an app delivery platform (in this case, shared caches were obsoleted by timing attacks) and the arms race for ever more crap to counter the negative effects, insufficiently. The web may now be a platform to lock-in and enslave users; just isn't anymore a recommendable place fo…

How has the web been subverted? By whom? And which notable, useful old tecnologies have been discarded? The capabilities of the web have only been expanded. You can still build websites in Django and Rails and myriad other "old-school" technologies. What are you missing? Perl and CGI? To the point of this article, you can perfectly build a website with self-hosted fonts, or with default system fonts. Is this what "lo…

This comment touches on some points which don't make sense from an engineering perspective. Different tools for different use cases. You can't throw the baby out with the bathwater and choose SPAs for every single application. They still perform poorly with SEO and people with disabilities that need a screen reader. It's not black and white (good or bad). Also, using Django and Rails are hardly the same as using Perl and CGI.

Re: Self-host your fonts for better performance

#204
post #169

Earlier quoted context omitted.

uMatrix hasn't been updated in a year and the repo has been archived: https://news.ycombinator.com/item?id=24532973 You'll probably have to let it go someday :(

I'm well aware. But that day will be when it stops working, and right now it still works fine. (Actually, it will be some time after that, since the day it stops working I will spend some time investigating how much work it would be to un-break it myself. The web can pry uMatrix from my cold, dead fingers. And I suspect I am not alone in feeling that way.)

Is there a reason to not use uBlock Origin? I’ll admit, I never used uMatrix, so I don’t know what it does; only adblockers.

Re: Self-host your fonts for better performance

#205

Earlier quoted context omitted.

I live in a rural area with bad internet, and the trend to load all of these external fonts, images and javascript externally over https basically makes the web unusable for us. The overhead of the handshakes required by the https connection greatly increased the page load time, and there is about a 1-in-4 chance of one of them timing out and not loading, so as a result the page doesn't load properly or pauses and st…

Wasn’t the point of Google Fonts that your browser would have in its cache fonts from Google so it wouldn’t download multiple copies from all over the place? A CDN basically. I know jQuery and Bootstrap recommend using their CDNs so browsers have the copy in their cache. Of course, there’s always the tracking ability, but that’s inherent to every CDN.

From TFA:

> Since Chrome v86, released October 2020, cross-site resources like fonts can’t be shared on the same CDN anymore. This is due to the partitioned browser cache

Re: Self-host your fonts for better performance

#206

Earlier quoted context omitted.

I live in a rural area with bad internet, and the trend to load all of these external fonts, images and javascript externally over https basically makes the web unusable for us. The overhead of the handshakes required by the https connection greatly increased the page load time, and there is about a 1-in-4 chance of one of them timing out and not loading, so as a result the page doesn't load properly or pauses and st…

Wasn’t the point of Google Fonts that your browser would have in its cache fonts from Google so it wouldn’t download multiple copies from all over the place? A CDN basically. I know jQuery and Bootstrap recommend using their CDNs so browsers have the copy in their cache. Of course, there’s always the tracking ability, but that’s inherent to every CDN.

[deleted]

Re: Self-host your fonts for better performance

#207

Earlier quoted context omitted.

I live in a rural area with bad internet, and the trend to load all of these external fonts, images and javascript externally over https basically makes the web unusable for us. The overhead of the handshakes required by the https connection greatly increased the page load time, and there is about a 1-in-4 chance of one of them timing out and not loading, so as a result the page doesn't load properly or pauses and st…

Wasn’t the point of Google Fonts that your browser would have in its cache fonts from Google so it wouldn’t download multiple copies from all over the place? A CDN basically. I know jQuery and Bootstrap recommend using their CDNs so browsers have the copy in their cache. Of course, there’s always the tracking ability, but that’s inherent to every CDN.

> Wasn’t the point of Google Fonts that your browser would have in its cache fonts from Google so it wouldn’t download multiple copies from all over the place?

That's true for now (you should know that Google Chrome will deploy changes on caching third-party content), but webfont caching simply doesn't work as well when you've realized that websites that do use webfonts have a tendency to pick fonts that are unlikely to match another website.

Re: Self-host your fonts for better performance

#208
post #75
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.

Wonder no more! "The open source fonts in the Google Fonts catalog are published under licenses that allow you to use them on any website, whether it’s commercial or personal." https://developers.google.com/fonts/faq This would be the opportunity for them to tell us that applies only to fonts delivered via CDN. On the contrary, they later recommend self-hosting.

Different product but I wouldn't trust anything Google has to say on licensing after seeing this play out:

https://mobile.twitter.com/matt_lowne/status/119537351841594...

tl;dr - Kerbal Space Program YouTuber gets every video he ever made copyright claimed by Sony after using a track from YouTube's own audio library.

To their credit YouTube did offer a "solution" to the problem but they denied all knowledge of the track being available in their library.

Re: Self-host your fonts for better performance

#209

Earlier quoted context omitted.

Wasn’t the point of Google Fonts that your browser would have in its cache fonts from Google so it wouldn’t download multiple copies from all over the place? A CDN basically. I know jQuery and Bootstrap recommend using their CDNs so browsers have the copy in their cache. Of course, there’s always the tracking ability, but that’s inherent to every CDN.

From TFA: > Since Chrome v86, released October 2020, cross-site resources like fonts can’t be shared on the same CDN anymore. This is due to the partitioned browser cache

Which is one of the many reasons I've stopped the almost hourly updates of Chrome. I feel fo people that have bad bandwidth or poor wireless connections. One of my favorite rants if web builders and more importantly the managers of team that build websites were forced to use a DSL speed level connection daily a lot of the cruft would go away.

Re: Self-host your fonts for better performance

#210
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)

Wanna go even faster, just delete your browser and curl everything.
Post reply on HN