Skip to content

Commit

Permalink
[AssetMapper] Recommending Cache-Control instead of Expires HTTP …
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLandauer authored Mar 4, 2024
1 parent b8f6679 commit c215366
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit c215366

Please sign in to comment.