-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add Cache-Control "public,max-age=0,must-revalidate" to index.html in SPA Example #410
base: master
Are you sure you want to change the base?
Conversation
… SPA example Add the Cache-Control "public,max-age=0,must-revalidate" for index.html header to the SPA example. In SPAs the index.html must be prevented from being cached, in the index.html the (hashed) javascript and css file are referenced (these can be cached becaused they get a new random suffix everytime they are built)
Is this strictly true for all SPAs? Mine work without this. The example here should be as minimal as possible, but in the new docs we can expand the examples. |
Afaik as soon as you do But you are right, maybe a second example which talks about this issue would be better than modifying the minimal example. One then could also add a long cache time ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Matt this should probably be a follow-up on the basic example rather than modifying the basic one.
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Can you point me to the new docs, then i can add this example there |
Oh I haven't got them ready yet. 😅 that's on me, I'm a bit behind lately. |
Edit the SPA example
Add the Cache-Control "public,max-age=0,must-revalidate" for index.html header to the SPA example.
In SPAs the index.html must be prevented from being cached, in the index.html the (fingerprinted) javascript and css file are referenced (these can be cached becaused they get a new random suffix everytime they are built)