I've read that Firefox has begun supporting a cache control extension value of immutable
, which means that "the response body will not change over time." So even if a user requests a "full refresh" of a page or resource, the browser still only responds with the locally cached copy, thus avoiding unnecessary 304s or page refreshes, and making pages load faster since cached content is used, and decreasing load on servers, since a large number of requests are stopped before they even happen.
I'm trying to see how well this is supported, and am finding varying answers, as this mozilla page suggests that it's only supported in Firefox, but this resolved Chrome issue suggests it's been available since Chrome v54.
Which browsers support Cache-Control: immutable
, and when did they start supporting it?
I first read about it here on this Hacker News discussion
Here's an ietf draft on it, the original mozilla post announcing this beta feature being used by Facebook and this related mozilla post, and a document discussing the different types of reloading requests from some Google chrome devs, it appears.
What is Cache-Control: immutable ? # The Cache-Control: immutable directive was first introduced in Firefox 49 to provide the browser with hints as to which resources never change.
The browsers do not share a cache, but plugins might. Like Adobe Flash keeps cross-browser history and "local shared objects", which can be used in a cookie-like way. Clearing a cache in a browser usually does not remove the information stored by such plugin.
The basic idea behind it is the following: The browser requests some content from the web server. If the content is not in the browser cache then it is retrieved directly from the web server. If the content was previously cached, the browser bypasses the server and loads the content directly from its cache.
As of February 2017, Cache-Control: immutable
is supported by
It is also listed on MDN and Can I Use ... ?.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With