News for hackers. Stuff that matters.
Re:Google Fonts Redesigned by putlake on Tuesday June 14, 2016 @02:58PM (#11904411)
They do provide proper cache headers. They cache the CSS for 1 day. The actual font files are cached for a lot longer than that.

The reason for shorter cache periods for CSS is that Google are continually making improvements. The font files are different e.g. for Mac vs Windows because they are optimized for platforms.

In general you will find that all URLs that are directly called from millions of websites (e.g. facebook SDK, Google Analytics snippet) have short TTLs. Makes sense when you think about it -- 3rd parties providing these resources need a way to stay agile and ship new versions without forcing millions of websites to upgrade their code.

Re:Google Fonts Redesigned by xaduha on Tuesday June 14, 2016 @03:02PM (#11904444)
> They do provide proper cache headers. They cache the CSS for 1 day. The actual font files are cached for a lot longer than that.

I don't see it, not with curl at least.

Looks like actual fonts are cached for a year.

But not CSS,

> curl https://fonts.googleapis.com/css?family=Open+Sans -i

expires:Tue, 14 Jun 2016 19:02:03 GMT

date:Tue, 14 Jun 2016 19:02:03 GMT

At the very least they should allow to control that with another query parameter.

Re:Google Fonts Redesigned by row1an on Tuesday June 14, 2016 @11:43PM (#11907063)
Expires is a HTTP/1.0 header, Cache-Control is HTTP/1.1 and used by anything created in the last 10-15 years. Most sites set the Expires header similar to their Cache-Control max-age, but I guess Google just doesn't care and it doesn't really matter anyway.
Re:Google Fonts Redesigned by xaduha on Wednesday June 15, 2016 @06:42AM (#11908393)
You might be right, but what I see in the browser dev tools is that my page always gets the CSS from Google Fonts and that does matter to me.
Re:Google Fonts Redesigned by row1an on Wednesday June 15, 2016 @10:27PM (#11913543)
It loads from the cache in Chrome, Firefox, Safari, IE, and Edge for me.