Re:Using Immutable Caching to Speed Up the Web
by viraptor on Friday January 27, 2017 @05:50AM
(#13499001)
It's called subresource integrity. The spec is at: https://www.w3.org/TR/SRI/
Mozilla already implements it: https://hacks.mozilla.org/2015/09/subresource-integrity-in-f...
Re:Using Immutable Caching to Speed Up the Web
by drinkjuice on Friday January 27, 2017 @10:23AM
(#13500272)
Does this make the browser avoid the request if it already has a cached script with that hash? If so, that would indeed be exactly what I was hoping for, except it would need to be extended for all things, not just javascript. Anyway, thanks!
And I also have the feeling that surely, just this exist, I just don't know about it ^^
Linking things by hash, other than being so very ugly, consider this case: you have this asset that changes every minute, and is several MB. If a users users your site too much, you will flush out out all other cached stuff with old versions of that file that will never get referenced again. That just strikes me as extremely wasteful, that is, you get a short term boost but even worse performance overall. If other sites do it too much, it will mean your own stuff will not even be cached when visitors come back.