Opened 9 years ago
Last modified 5 years ago
#798 new enhancement
Implement http_brotli_static module
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | |
Component: | nginx-core | Version: | 1.9.x |
Keywords: | Cc: | ||
uname -a: | |||
nginx -V: | 1.9.5 |
Description
Today, nginx supports the http_gzip_static module (http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html) for doing ahead-of-time gzip compression of assets; this is very useful because it allows using high-ratio/low-performance compressors like Zopfli.
Web Browsers (Chrome and Firefox, to start) are about to start supporting a new Content-Encoding, named Brotli, which offers MUCH improved compression ratios but with slow performance. http://textslashplain.com/2015/09/10/brotli/ As such, we need nginx to support a similar module (e.g. http_brotli_static) for this new content-encoding.
Attachments (1)
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Firefox 44 (scheduled for release in January 2016) will support Brotli: https://bugzilla.mozilla.org/show_bug.cgi?id=366559
It would be nice to have Brotli support available in nginx out-of-the-box. For me personally, the "brotli_static" feature mentioned in this bug report would be fine, I don't (yet) need on-the-fly Brotli compression.
Maybe this can be considered for the 1.9 branch?
Thank you for nginx!
comment:3 by , 9 years ago
Just to add a few more relevant links:
- Brotli Draft http://www.ietf.org/id/draft-alakuijala-brotli-08.txt
- Google have written a Brotli module for Nginx https://github.com/google/ngx_brotli
- CloudFlare have written a Brotli module for Nginx https://github.com/cloudflare/ngx_brotli_module
- Broitli in Chrome is available as a flag http://www.omgchrome.com/brotli-http-compression-coming-to-chrome/
- Brotli will be supported out-of-the-box in Firefox 44 https://bugzilla.mozilla.org/show_bug.cgi?id=36655
- This issue has a $100 bounty on Bountysource https://www.bountysource.com/issues/27351574-implement-http_brotli_static-module
comment:4 by , 8 years ago
The Google Brotli module should be added now to nginx.
Most modern browsers support Brotli (http://caniuse.com/#feat=brotli):
- Edge 15 (Current version 14)
- Firefox 44 (Current version 50)
- Chrome 50 (Current version 55)
- Opera 38 (Current version 42)
There is also a fallback to gzip for older Browsers.
comment:5 by , 8 years ago
An alternative could be to extend http_gzip_static module, because share 99% of logic.
http://mailman.nginx.org/pipermail/nginx-devel/2017-February/009536.html
by , 8 years ago
Attachment: | brotli_1_11_10.patch added |
---|
comment:6 by , 7 years ago
What needs to be done to get the attached patch merged? The https://github.com/google/ngx_brotli module is apparently abandoned with the latest commit a year ago.
comment:7 by , 5 years ago
Right now all major browsers support Brotli including Safari.
https://github.com/google/ngx_brotli is live again, but this third-party module is not a good solution since the official nginx Docker image accepts only official modules (see https://github.com/nginxinc/docker-nginx/issues/371).
Can we do something to add Brotli to the list of official modules to have a good Docker image with nginx and Brotli, since it is pretty important for web performance?
It appears that Google has made this issue rather moot by releasing a module that handles both static and on-the-fly Brotli compression: https://github.com/google/ngx_brotli