-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Update use cache control immutable for static file #39484
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @rogerdz. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento create issue |
In my opinion, we should only do this for static assets in Also, we should not only update the nginx config file, but also the And we should also be aware that this feature is not fully supported yet by the various major browsers at this moment: https://caniuse.com/mdn-http_headers_cache-control_immutable |
@magento run all tests |
Description (*)
Update Cache-Control header to static file (assets, media)
As explained in the Mozilla documentation:
``When a user reloads the browser, the browser will send conditional requests for validating to the origin server. But it's not necessary to revalidate those kinds of static resources even when a user reloads the browser, because they're never modified. immutable tells a cache that the response is immutable while it's fresh and avoids those kinds of unnecessary conditional requests to the server.`
Inspire by:
serversideup/docker-php#487
https://www.keycdn.com/blog/cache-control-immutable
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: