Hacker News new | past | comments | ask | show | jobs | submit login

Might be a bit of a dumb question. But when I load google.com and look at the requests. It has fonts.google.com says 200 and 'from memory cache' is that actually sending a request in any way to Google? Or is that actually handled locally? Most of the time I am getting this, so not seeming to make actual requests to them the majority of the time. Is it actually hitting their servers for these tracking stats, or is something like that not even making it to these stats?



200 means it's hitting your cache and not doing any network requests. The analytics are based on actual HTTP requests. At the time I was there, we were only able to make rough guesses about the fraction of queries that were successful in the client cache, we didn't have any systematic way to dig into that.


It depends on the cache control headers sent by the original asset. If you want to make sure you don't hit the CDN, install the Decentraleyes browser extension.


At the time I was there, we aggressively set the cache control headers to minimize the number of requests. Among other things, the font binaries were all versioned and served so each URL was immutable forever. (There's some subtlety around this, it's a 2 stage process with CSS first then the font binaries, and the CSS was generally served with 24 hour expiration).

One motivation was sharing the cache among all sites that linked the fonts, which at the time I think was a big win, but as has been mentioned elsewhere, this is going away.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: