How to enable brotli compression in Tengine
2026-09-29
AdSense Slot
Brotli gives better compression ratio than gzip, which reduces bandwidth and improves page load speed.
Check brotli module availability
Some Tengine builds include brotli module. Check:
nginx -V | grep brotli
If missing, you need to compile Tengine with brotli module.
Brotli config snippet
Add inside http block of tengine.conf
brotli on;
brotli_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
brotli_min_length 1024;
brotli_comp_level 6;
Test configuration
nginx -t
nginx -s reload
Verify brotli works
Use curl to check response header:
curl -I https://yourdomain.com/page
Look for content-encoding: br.
Notes
Do not compress images or binary files such as jpg, png. Brotli works best on text assets.
Summary
Brotli is an easy performance optimization for Tengine sites, great for SEO and user experience.
AdSense Slot