magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Update use cache control immutable for static file

Open rogerdz opened this issue 10 months ago • 5 comments

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: https://github.com/serversideup/docker-php/pull/487 https://www.keycdn.com/blog/cache-control-immutable

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Check cache control header static file (js, css, image,...) image image image

Questions or comments

Contribution checklist (*)

  • [ ] Pull request has a meaningful description of its purpose
  • [ ] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [ ] All automated tests passed successfully (all builds are green)

Resolved issues:

  1. [x] resolves magento/magento2#39486: Update use cache control immutable for static site

rogerdz avatar Dec 16 '24 17:12 rogerdz