You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on a bit of digging it looks like we'll need to switch to the new policies to do this (vs. legacy caching) on the relevant endpoints. It does seem like a good win!
Also I should mention: .woff, .woff2, and .png files should be excluded since they are already compressed. There's a good chance CloudFront's config is smart enough to do this already, but worth checking.
(Moving from rust-lang/rust#82286)
We can achieve a significant decrease in file size by enabling Brotli compression, which is an option in CloudFront: https://aws.amazon.com/about-aws/whats-new/2020/09/cloudfront-brotli-compression/
Brotli has been supported in major browsers since 2016: https://en.wikipedia.org/wiki/Brotli
search-index1.50.0.js is currently served as 272,247 gzip bytes, but it could be served as 140,170 brotli bytes.
$ curl https://doc.rust-lang.org/search-index1.50.0.js --header "Accept-Encoding: gzip" -o search-index.js.gz
$ zcat search-index.js.gz | brotli > search-index.js.br
$ ls -l search-index.js.*
-rw-rw-r-- 1 jsha jsha 140170 Feb 18 23:56 search-index.js.br
-rw-rw-r-- 1 jsha jsha 272247 Feb 18 23:56 search-index.js.gz
The text was updated successfully, but these errors were encountered: