Brotli (brotli.org, Google) is a compression algorithm 15-25% better than gzip for text (HTML/CSS/JS). Client support 95%+ by 2026. Install in nginx: compile ngx_brotli module (not in the default dynamic pool) or use the nginx-extras package. Add 3 directives + server reload.
Below: step-by-step, working examples, common pitfalls, FAQ.
apt install nginx-module-brotli (Ubuntu 22.04+)git clone --recursive https://github.com/google/ngx_brotli + configure nginx with --add-moduleload_module modules/ngx_http_brotli_filter_module.so; load_module modules/ngx_http_brotli_static_module.so;brotli on; brotli_comp_level 6; brotli_types text/plain text/css application/json application/javascript;brotli_static on;nginx -t && systemctl reload nginxcurl -H "Accept-Encoding: br" -I https://example.com | grep -i "content-encoding" — should be "br"| Scenario | Config |
|---|---|
| nginx.conf modules | load_module modules/ngx_http_brotli_filter_module.so;
load_module modules/ngx_http_brotli_static_module.so; |
| server block | brotli on;
brotli_comp_level 6;
brotli_static on;
brotli_types text/plain text/css application/json application/javascript application/xml+rss text/xml image/svg+xml; |
| Pre-compress files | find /var/www -type f \( -name "*.css" -o -name "*.js" \) | xargs -I{} brotli -q 11 "{}" |
| Apache | LoadModule brotli_module modules/mod_brotli.so\nBrotliCompressionQuality 5 |
Page load speed directly impacts conversion, SEO rankings, and user satisfaction. Google uses Core Web Vitals as a ranking factor. Every extra second of load time cancost up to 7% in conversions.
Google Lighthouse-based analysis: Performance, Accessibility, Best Practices, SEO.
LCP (rendering), FID (interactivity), CLS (visual stability) — key Google metrics.
Breakdown by type: HTML, CSS, JavaScript, images, fonts. Size, request count, blocking resources.
Specific recommendations with savings estimates: image compression, caching, minification, etc.
Core Web Vitals for rankings
performance optimization
speed = conversions
performance regression
async/defer block rendering. Move to end or add attribute.Cache-Control, the browser reloads CSS/JS on every visit.loading="lazy" for images below the fold.brotli on;Cache-Control: max-age=31536000, immutable. HTML: max-age=0, s-maxage=60.<link rel="preload"> for fonts and CSS. Reduces LCP by 200-500ms.Speed check history, competitor comparison and PageSpeed monitoring.
Sign up freeFor text (HTML/CSS/JS): 15-25% smaller at the same CPU. For binaries (already compressed) — minimal.
Yes; clients don't send Accept-Encoding: br over plain HTTP. Modern sites are all HTTPS.
Chrome 50+, Firefox 44+, Safari 11+ (2017). IE no support. By 2026 coverage is 95%+.
<a href="/en/speed">Enterno Speed checker</a> shows response headers. Or DevTools → Network → Response Headers → Content-Encoding.