-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache compiled fingerprinted assets for 1y #139
base: master
Are you sure you want to change the base?
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.