Skip to content

Commit 6e0096f

Browse files
committed
minor #19609 [AssetMapper] Shortening "Optimizing Performance" (ThomasLandauer)
This PR was merged into the 6.4 branch. Discussion ---------- [AssetMapper] Shortening "Optimizing Performance" Page: https://symfony.com/doc/6.4/frontend/asset_mapper.html#optimizing-performance Main reason: No need to repeat Cloudflare over and over - it's in the introduction paragraph anyway. Commits ------- 4c03d57 [AssetMapper] Shortening "Optimizing Performance"
2 parents ef2c3b2 + 4c03d57 commit 6e0096f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

frontend/asset_mapper.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -627,27 +627,25 @@ To make your AssetMapper-powered site fly, there are a few things you need to
627627
do. If you want to take a shortcut, you can use a service like `Cloudflare`_,
628628
which will automatically do most of these things for you:
629629

630-
- **Use HTTP/2**: Your web server **must** be running HTTP/2 (or HTTP/3) so the
630+
- **Use HTTP/2**: Your web server should be running HTTP/2 (or HTTP/3) so the
631631
browser can download assets in parallel. HTTP/2 is automatically enabled in Caddy
632-
and can be activated in Nginx and Apache. Or, proxy your site through a
633-
service like Cloudflare, which will automatically enable HTTP/2 for you.
632+
and can be activated in Nginx and Apache.
634633

635634
- **Compress your assets**: Your web server should compress (e.g. using gzip)
636635
your assets (JavaScript, CSS, images) before sending them to the browser. This
637636
is automatically enabled in Caddy and can be activated in Nginx and Apache.
638-
Or, proxy your site through a service like Cloudflare, which will
639-
automatically compress your assets for you. In Cloudflare, you can also
637+
In Cloudflare, you can also
640638
enable `auto minify`_ to further compress your assets (e.g. removing
641639
whitespace and comments from JavaScript and CSS files).
642640

643641
- **Set long-lived Expires headers**: Your web server should set long-lived
644-
Expires headers on your assets. Because the AssetMapper component includes a version
645-
hash in the filename of each asset, you can safely set the Expires header
642+
``Expires`` HTTP headers on your assets. Because the AssetMapper component includes a version
643+
hash in the filename of each asset, you can safely set the ``Expires`` header
646644
to a very long time in the future (e.g. 1 year). This isn't automatic in
647645
any web server, but can be easily enabled.
648646

649647
Once you've done these things, you can use a tool like `Lighthouse`_ to
650-
validate the performance of your site!
648+
check the performance of your site.
651649

652650
.. _performance-preloading:
653651

0 commit comments

Comments
 (0)