Cloudflare serves GZIP content instead of website

I’ve got the following issue with my website (https://modery.net) from time to time:
It is not in the Cloudflare cache as it probably has not been accessed recently (Browser Cache TTL: 12 hours, Cache Level: Cache Everything, Edge Cache TTL: 12 hours), and once I open it, I can see what I assume to be the GZIP response from my site:


Once I clear the Cloudflare cache for the root and open it again, it gets served properly.

Does anyone have any idea what could cause this behaviour?

IMHO some encoding mismatch. You appear to have a page rule in place which caches your HTML as well. Based on your description it would seem to me as if Cloudflare didnt cache the actual HTML in certain cases but the zipped version of it.

Could it be that your server does return the zipped content but not the right Content-Encoding header in some cases? In that case Cloudflare would assume the content is not compressed and cache it as-is.

I never noticed this issue before I started using Cloudflare. But I was doing some heavy testing, and it in the end narrowed it down to a setting in a Wordpress caching plugin (which I’ve had turned on for a few years now). As I don’t need to double-cache (Cloudflare is doing a waaaaay better job), I disabled the plugin - and the problem is gone!

This topic was automatically closed after 14 days. New replies are no longer allowed.