Skip to content

Update asset_mapper.rst #20366

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
Dec 6, 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
3 changes: 1 addition & 2 deletions frontend/asset_mapper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -639,15 +639,14 @@ To make your AssetMapper-powered site fly, there are a few things you need to
do. If you want to take a shortcut, you can use a service like `Cloudflare`_,
which will automatically do most of these things for you:

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

- **Compress your assets**: Your web server should compress (e.g. using gzip)
your assets (JavaScript, CSS, images) before sending them to the browser. This
is automatically enabled in Caddy and can be activated in Nginx and Apache.
In Cloudflare, assets are compressed by default.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this?

Cloudflare still compress by default (in gzip, brotli or zstandard) all web assets and more. See https://developers.cloudflare.com/speed/optimization/content/compression/

What Cloudflare remove was the minification of assets. See https://community.cloudflare.com/t/deprecating-auto-minify/655677 But we already removed that from the Symfony Docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While merging, I reverted this change.


- **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
Expand Down
Loading