Skip to content

[AssetMapper] Recommending Cache-Control instead of Expires HTTP header #19628

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

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/asset_mapper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,10 @@ which will automatically do most of these things for you:
enable `auto minify`_ to further compress your assets (e.g. removing
whitespace and comments from JavaScript and CSS files).

- **Set long-lived Expires headers**: Your web server should set long-lived
``Expires`` HTTP headers on your assets. Because the AssetMapper component includes a version
hash in the filename of each asset, you can safely set the ``Expires`` header
to a very long time in the future (e.g. 1 year). This isn't automatic in
- **Set long-lived cache expiry**: Your web server should set a long-lived
``Cache-Control`` HTTP header on your assets. Because the AssetMapper component includes a version
hash in the filename of each asset, you can safely set ``max-age``
to a very long time (e.g. 1 year). This isn't automatic in
any web server, but can be easily enabled.

Once you've done these things, you can use a tool like `Lighthouse`_ to
Expand Down