Skip to content

Commit 7261f52

Browse files
committed
minor #19628 [AssetMapper] Recommending Cache-Control instead of Expires HTTP header (ThomasLandauer)
This PR was merged into the 6.4 branch. Discussion ---------- [AssetMapper] Recommending `Cache-Control` instead of `Expires` HTTP header Page: https://symfony.com/doc/6.4/frontend/asset_mapper.html#optimizing-performance Closes #19626 Commits ------- c215366 [AssetMapper] Recommending `Cache-Control` instead of `Expires` HTTP header
2 parents 8afb402 + c215366 commit 7261f52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/asset_mapper.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,10 @@ which will automatically do most of these things for you:
629629
enable `auto minify`_ to further compress your assets (e.g. removing
630630
whitespace and comments from JavaScript and CSS files).
631631

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

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

0 commit comments

Comments
 (0)