Last modified: 2013-07-03 12:13:05 UTC
Webfonts seem to be delivered with the header Cache-Control: max-age=2592000 (30 days, in seconds). This means that en.wiktionary could be forcing all 1.6 MB of fonts to be downloaded twice in one billing period, during a 31-day month. This might needlessly accrue a significant cost for someone on a metered internet connection, whether wired or wireless. The cache should not force a purge until 32 days (2764800 seconds) have passed. It wouldn’t hurt to apply this to any other resources that are set to be purged in 30 days, for all Wikimedia sites.
Why not have an even longer period? Are such fonts expected to change a lot? They might well be kept the same for years...
The server sends an etag too, so if the file is changed, then it will be downloaded again anyway.
Does max-age force the cached copy to be deleted? From my understanding, if a cache sees a max-age directive, after the specified time it would do a request with a If-Modified-Since header, and the server would reply with a HTTP 304 Not Modified (just headers, not entity body) and the client won't need to download the resource again, extending the cache lifetime another "max-age" period.
The idea is interesting, the question is where this code is. :)
Mark: Any idea where this code could be?