Opened 9 years ago

Last modified 4 years ago

#798 new enhancement

Implement http_brotli_static module

Reported by: bayden@… 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)

brotli_1_11_10.patch (9.6 KB ) - added by eustas@… 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by bayden@…, 9 years ago

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

comment:2 by Steffen Weber, 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 lewisgoddard@…, 9 years ago

Just to add a few more relevant links:

comment:4 by cmoeke@…, 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 eustas@…, 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

Version 0, edited 8 years ago by eustas@… (next)

by eustas@…, 8 years ago

Attachment: brotli_1_11_10.patch added

comment:6 by marbacz@…, 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 ai@…, 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?

comment:8 by Maxim Dounin, 4 years ago

See also #1961.

Note: See TracTickets for help on using tickets.