Both brotli and gzip end-to-end compresion support?

Based on the doc,

If your origin server responds to a Cloudflare request using Gzip/Brotli compression, we will keep the same compression in the response sent to the website visitor if…

I set up the server accordingly and I see brotli-compressed assets are used (I use a higher compression ratio so I can tell the brotli-compressed assets are end-to-end).

However, gzip compression still comes from Cloudflare. I guess Cloudflare requested the asset from the origin, and the origin responded with the brotli-compressed asset, but not the gzip-compressed asset. Then Cloudflare would not re-request a gzip-compressed asset, and gzipped the asset on Cloudflare’s server instead.

Is there a way to enable end-to-end compression for both encoding?

Hi @hong5

Great you got e2e Brotli working. What clients are n ot supporting br?

to answer your question: Currently not we will only go to the origin for the asset once and pull that from the origin and do conversion on the fly. We are potentially looking at cache forking on Content-encoding in the future but we are only in the early discussion phase. This is because over the coming year we will be looking at ZSTD and potentially BR-d and Zstd-d which would cause a shard of the same asset 5 times in cache.

PM for Platform

1 Like

It’s only some edge cases for us with no browser clients. I was trying to understand whether this is easily possible with cloudflare, but it seems to be not possible.

Anyway, thanks for the response!

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