Comment by dktalks

Comment by dktalks 13 hours ago

8 replies

What benefits are you getting from this? I mean have you built an entire CDN to cache the fonts so that your server does not have to download it every time a new page is loaded? I understand self-hosting for your own servers, but for a website this is overkill.

mlunar 13 hours ago

Not the author, but last time I checked (3y ago), the fonts CDN was surprisingly slow, like hundreds of milliseconds of latency.

As the website I was optimizing was selfhosted, also selfhosting the font had a noticeable effect on the page load time. See https://github.com/SmilyOrg/photofield/commit/12352667c01624...

I'm not sure what you mean with the rest of the comment though, it's a very small change and it gets cached by the browser like other static assets, so I'm not sure what is the overkill here.

ameliaquining 13 hours ago

Hotlinking Google Fonts leaks your visitors' IP addresses to Google. This bothers some people.

freedomben 13 hours ago

For me the biggest benefit is that my customer doesn't have to whitelist a google endpoint to use our website. Secondary benefit is being in control of downtime and/or updates (though the secondary benefit on it's own is nowhere near enough to justify self-hosting to me, but for some people it might be)

Velocifyer 13 hours ago

I have Cloudflare and I have the TTL set to 10 years

carlosjobim 9 hours ago

In cases where this matters, you are already using a CDN for your site, like Cloudflare. Advantage is better speed for page visitors.