Gzip compression: some resources are not, some increased. Why?

I’m checking on Chrome devtools and I can see that some resources are not compressed, and some are even increased in size. I’m running a test on website.pages.dev - not on the domain name.

In Response Headers for ALL .css files I see: “content-encoding: br” while should be “gzip”.
Also please note in the screenshot the file hero.min.css with size 1.5 Kb is not compressed; and all fonts have increased slightly. Why?

I have also enabled Brotli on Optimization tab in Cloudflare dashboard.

If you look at the request headers, do you see a request header like this: Accept-Encoding: br, grip? This is your browser indicating support for two compression schemes. Brotli is preferred over Gzip, so this is expected behaviour.

1 Like

In Request Headers I see: “accept-encoding: gzip, deflate, br” for all resources. So why hero.min.css is still 1.5 Kb in the screenshot and fonts are slightly increased?

Some resources do not compress very well, and it is possible the files are already optimised to the point that compression is not effective.

If you want to disable compression for particular assets you can add a cache-control: no-transform header to those responses on your Origin.

2 Likes

I see, Michael. Thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.