What will Cloudflare compress?

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
application/javascript
application/x-javascript
text/javascript
text/js
image/x-icon
application/x-perl
application/x-httpd-cgi
text/xml
application/xml
application/rss+xml
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/woff
application/eot
application/font
application/font-woff woff
application/font-sfnt

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:

Still not finding what you need?

The Cloudflare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk