Please support brotli


#1

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:


Please compress static content with brotli level 11
#2

Cloudflare’s CTO on his Twitter:


#3

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:


#4

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?


#5

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.


#6

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


#7

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


#8

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.


#9

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).


#11

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


#12

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