Please support brotli

Cloudflare does not support brotli at all for now. The worst thing is: Cloudflare would modify Accept-Encoding header in any HTTP request so my server could not see it. Almost all modern browsers send Accept-Encoding: gzip, deflate, br, but Cloudflare completely rewrite it. Although my server is serving brotli files, it will get a wrong HTTP header.

At least, I wish Cloudflare could bypass br in Accept-Encoding, so a server could send back the correct file.

PS.
Brotli is a compression format which is supported by most modern browsers. Google and many websites use it to minimize static files.
In fact, Cloudflare has implemented brotli for nginx a year ago:

Cloudflare’s CTO on his Twitter:

https://twitter.com/jgrahamc/status/930356017275293697

https://twitter.com/jgrahamc/status/930361107591716865

2 Likes

Yes, we did “silently” start testing again recently. If you encounter any issues you think may be related please do let us know here or by contacting support. :gift:

I’m still getting gzip between Cloudflare and the origin, though? Was that a coincidence and both are in use? If it’s still gzip only for now, are you working on Brotli to origins?

1 Like

FWIW my users are asking for brotli support as well. According to Cloudflare’s blog post from Oct 2015:

The current state of Brotli gives us some mixed impressions. There is no yes/no answer to the question “Is Brotli better than gzip?”. It definitely looks like a big win for static content compression, but on the web where the content is dynamic we also need to consider on-the-fly compression.

On unpkg.com most of the content we serve is static, so this should provide a significant benefit to our users.

1 Like

Brotli is currently turned on, at least for my site.

1 Like

Also Sonarwhal is requiring Brotli and Zopfli https://sonarwhal.com/docs/user-guide/rules/http-compression/

1 Like

Brotli works between User <— Cloudflare, not between Cloudflare <— Origin. If you use AWS, you pay for your data a lot. So If you can save 10%, it is really good.

1 Like

It’s true that you pay for data costs with AWS, but not all browsers support Brotli compression (see here). So if you use Brotli origin files on AWS (instead of gzip or plain files), then not all users would be able to use those browsers.

I also think that Brotli only works on text assets and not on images, which are typically much bigger (and thus expensive).

Most of major browsers support Brotli (here). We need Brotli for dynamic content. Images and other static files are cached by Cloudflare quite well.

1 Like

Using Brotli between Cloudflare and origins doesn’t depend on browser support.

1 Like

Any news on this? Should I enable brotli on my origin server?