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


Enable Brotli compression

  1. Log in to your Cloudflare account.
  2. Choose the appropriate domain. 
  3. Click the Speed app. 
  4. Click the Optimization tab.
  5. Toggle the Brotli switch to On.

brotli_on.png

Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.

Powered by Zendesk