cache compiled fingerprinted assets for 1y#139
cache compiled fingerprinted assets for 1y#139wenzowski wants to merge 2 commits intomattkrick:masterfrom
Conversation
|
Alrighty i'm gonna need a walkthrough on this one... the So that leaves us with the css file, right? If so, I think it may be worthwhile to just put a hash on the css filename in webpack & then we can always cache on the hash, which means we'll get a cache hit more often. Ultimately, though, I'm thinking about converting the styles to |
|
Good to know. PR updated. This now
By setting public and max-age we tell the browser that it may cache each fingerprinted chunk for up to one year. In order to tell the browser that it must cache each chunk, we would still need to implement a Service Worker. |
|
This is setting http headers for the client and all intermediary caches to interpret. Let me know if a better walkthrough is necessary |
|
so assuming we put a hash on the |
|
The reason this PR exists is to add |
Yes, that would be just as readable, and would pull it out of runtime. |
This sets the Cache-Control header to instruct the browser to cache everything served from the build folder for one year except for the three files marked volatile.