Re:Self-Hosting Google Web Fonts
by rahimnathwani on Saturday December 27, 2014 @09:41AM
(#8802652)
I'm curious - why would you want to host these yourself? Don't your users then lose the benefit of caching (e.g. if they also visit other sites which use the same fonts).
[ Parent
| on HN ]
No tracking, easier development when without internet, less external dependencies.
You can, for example, use Google with a local fallback, for better reliability. (their CDN will fail at some time)
It is especially useful in China. Since google is blocked, we can not use google font apis as well.
Woah, interesting. Thanks very much for bringing this up, didn't know!
Yeah, and if we use fonts.useso.com is slow outside of China.
Re:Self-Hosting Google Web Fonts
by huhtenberg on Saturday December 27, 2014 @09:53AM
(#8802688)
Primarily to respect the privacy of your site's visitors.
It also removes a dependency on a 3rd party source.
I am an edge case, but one where big CDNs are blocked, especially Google. Where the cache doesn't work, often nor do the entire pages they're supposed to serve; this does not apply only to fonts.
Re:Self-Hosting Google Web Fonts
by therealwill on Saturday December 27, 2014 @11:04AM
(#8802891)
On my company's internal intranet site I try to self host everything because our company internet connection is very unreliable.
I suspect the caching benefit is minimal, the vast majority of visitors won't have the fonts in cache. I'm basing my suspicion off the research done into jQuery cache hit success rates at http://www.stevesouders.com/blog/2013/03/18/http-archive-jqu...
Web performance is complicated though and all the pros and cons interact in non-intuitive ways. A comparison of self-hosted, inexpensive CDN hosted, and original Google hosted may provide some performance surprises.
It certainly isn't worth the extra DNS roundtrips, especially on 3G and lower connections.
There is a small benefit when cacheing fairly small font files. And that's only if the sites your user visits have the same fonts as you.
If you're using anything outside of the, say, top 20 most popular fonts - users aren't going to get any benefit from the caching.
A few weeks ago suddenly a bunch of fonts changed messing up the layout of a site of a customer. I've also seen periodic slowdowns because the fonts would not load or load very slowly.
In general keeping the number of dependencies down is a good thing to do.