3 ms·
What a mess, but perhaps a happy ending. I made two other comments prior to this one in this thread, but then I read the Bugzilla thread [1] opened by Facebook
by niftich 10y ago
What a mess, but perhaps a happy ending. I made two other comments prior to this one in this thread, but then I read the Bugzilla thread [1] opened by Facebook that laid out the issue and Mozilla's defense. It's a highly enlightening read; I can't recommend it enough.
To summarize, the issue is that Facebook was seeing a higher rate of cache validation requests than they'd expect, and looked into it. Chrome produced an updated chart documenting different refresh behaviors [2], which is the spiritual successor of this now-outdated stackoverflow answer from 2010 [3], and in response to Facebook's requests, and have re-evaluated some of their refresh logic.
In this thread, Firefox was being asked to do the same, but they pushed back on adding yet another heuristic and in turn proposed a cache-control extension. Meanwhile, Facebook proposed the same thing on the IETF httpbis list, where the response not enthusiastic [4], largely feeling that that this is metadata about the content and not a prescriptive cache behavior, and that the HTTP spec already accounted for freshness with age. One of Mark Nottingham's responses [5]:
(...) From time to time, we've had people ask for "Cache-Control: Infinity-I-really-will-never-change-this." I suspect that often they don't understand how caches work, and that assigning a one-year lifetime is more than adequate for this purpose, but nevertheless, we could define that so that it worked and gave you the semantics you want too.
To keep it backwards compatible, you'd need something like:
Cache-Control: max-age=31536000, static
(or whatever we call it)
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1267474 https://bugzilla.mozilla.org/show_bug.cgi?id=1267474
[2] https://docs.google.com/document/d/1vwx8WiUASKyC2I-j2smNhaJaQQhcWREh7PC3HiIAQCo/edit https://docs.google.com/document/d/1vwx8WiUASKyC2I-j2smNhaJa...
[3] http://stackoverflow.com/questions/385367/what-requests-do-browsers-f5-and-ctrl-f5-refreshes-generate http://stackoverflow.com/questions/385367/what-requests-do-b...
[4] https://www.ietf.org/mail-archive/web/httpbisa/current/msg25463.html https://www.ietf.org/mail-archive/web/httpbisa/current/msg25...
[5] https://www.ietf.org/mail-archive/web/httpbisa/current/msg25505.html https://www.ietf.org/mail-archive/web/httpbisa/current/msg25...