In addition to Cloudflare's CDN caching static content and auto-minification of CSS, JS & HTML to speed up your site, Cloudflare also provides gzip and brotli compression to help site owners. 


Cloudflare will return gzip or brotli encoded responses to compatible clients / browsers for the following content-types:

text/html
text/richtext
text/plain
text/css
text/x-script
text/x-component
text/x-java-source
text/x-markdown
application/javascript
application/x-javascript
text/javascript
text/js
image/x-icon
application/x-perl
application/x-httpd-cgi
text/xml
application/xml
application/xml+rss
application/json
multipart/bag
multipart/mixed
application/xhtml+xml
font/ttf
font/otf
font/x-woff
image/svg+xml
application/vnd.ms-fontobject
application/ttf
application/x-ttf
application/otf
application/x-otf
application/truetype
application/opentype
application/x-opentype
application/font-woff
application/eot
application/font
application/font-sfnt
application/wasm


If you do not want a particular response from your origin to be encoded, you can disable this by setting cache-control: no-transform at your origin and turning Origin Cache Control -> On using a Page Rule.


How do I enable Brotli compression?

You can locate the setting for Brotli under the Speed section of your website's settings: