Quoting one of the comments from Patrick McManus: *"The core concept is that without immutable the concepts of fresh and current are* *not clearly separated. http caching allows for fresh (i.e. cache replayable) data * *that isn’t the most current representation of a resource – and of course firefox * *normally uses that. But when you press refresh we in the past have revalidated * *even fresh things (i.e. with a high max age) to check to see if they were still the * *most current. immutable lets the cache know that there is never more than 1 * *version of that resource, so we only need to worry about freshness and never * *re-validate under those circumstances."*
>From what I understand the behavior of browsers should change when pages are reloaded, for any resources linked that have cache-control: immutable. But.. I just tested, and I can not confirm that Chrome actually uses revalidation when I reload pages with cache-extended resources over at modpagespeed.com. It pulls them from its cache instead. So it looks like this needs some more testing with other browsers, and perhaps proxies, to see if there are clear advantages. Otto On Wed, Nov 29, 2017 at 3:31 PM Joshua Marantz <[email protected]> wrote: > This sounds like a reasonable idea to me. I agree that .pagespeed. URLs > are a good candidate for this, as long as the hash is matching and > therefore we are sending 1-year caching directives. > > However I'm confused why about why revalidation would be needed in such > cases, even without 'immutable', unless the item has been in cache for >1 > year. > > > On Thu, Nov 23, 2017 at 3:33 PM, Otto van der Schaaf <[email protected]> > wrote: > > > Hi all, > > > > I wanted to discuss emitting the "immutable" cache-control directive in > > responses for requests to .pagespeed. urls. > > > > After reading up on this fairly new cache-control directive, think we may > > be able to avoid revalidations by doing so. > > The RFC mentions versioned urls as a candidate for doing this, which I > > think also includes our fingerprinted .pagespeed. urls > > (these have a hash that changes when any of the underlying resources > > change) > > > > Rough implementation: > > https://github.com/pagespeed/mod_pagespeed/compare/oschaaf- > > cc-immutable?expand=1 > > > > Context: > > https://hacks.mozilla.org/2017/01/using-immutable- > > caching-to-speed-up-the-web/ > > https://tools.ietf.org/html/rfc8246 > > > > Would love to hear thoughts on this! > > > > Otto > > >
