Loading...
curl -sI https://example.com/app.jscurl -sI -H 'Accept-Encoding: br' https://example.com/app.jscurl sends no Accept-Encoding by default, so the server answers uncompressed; asking for 'br' shows if Brotli works.
Accept-Encoding and sends a matching Content-Encoding.Vary: Accept-Encoding so caches keep separate copies.Browsers advertise 'br' only over HTTPS, so sites served over HTTP get Gzip or no compression.
Use the maximum level 11 for files compressed ahead of time at build. For on-the-fly compression, middle levels like 4 to 6 balance speed and size.
Yes, for static assets. Compressing at build time allows the slowest, smallest setting without costing CPU on each request.