-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Update use cache control immutable for static file #39484
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
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 |
@engcom-Hotel Could you please review the newly added change ? Moving this for review. |
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE |
@magento run all tests |
Hello @rogerdz Thank you for contribution & collaboration! ✔️ QA PassedPreconditions:
Steps to verify:
Before: ❌ ![]() ![]() ![]() After: ✔️ For Apache web server: ![]() ![]() ![]() For Nginx web server: ![]() ![]() ![]() The builds are failing hence moving this PR for Extended Testing. |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests CE, WebAPI Tests |
b3d31e7
into
magento:2.4-develop
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: