Getting cached content even after purging all cache but can update response headers

What is the name of the domain?

What is the issue you’re encountering

Getting cached content even after purging all cache but can update response headers

What steps have you taken to resolve the issue?

Cache → Purge everything
Disable ‘Always Online’
Turn on Development Mode

What are the steps to reproduce the issue?

The website is a NextJS app with nginx proxy.
To made sure it’s not nginx caching issue I’ve set my domain and ip on /etc/hosts to visit my website without cloudflare.
It shows the updated content with response headers: Source Code | AxIEd | Rocket Powered Pastebin .

I’ve tried shutting down the server, then purging cache to see any difference but it still shows the same old content.
When I configured nginx add_header X-Cache-Status $upstream_cache_status; to see the nginx proxy cache status it appeared on both with Cloudflare and without cloudflare!
So I then set a custom header x-custom-header: Custom-Value and it appeared through cloudflare too though with the old content!!!
Here’s the response headers for request through cloudflare Source Code | 9rR42 | Rocket Powered Pastebin

Why headers are updating in cloudflare but content is not updated??? This makes no sense to me.

Cloudflare doesn’t actually cache full HTML pages by default… unless you specifically configure a Cache Rule to cache eligible content.

And your site is returning:

So it doesn’t seem like Cloudflare is caching your HTML.

If you still have doubts, temporarily put the zone in DNS-only mode(:grey:) to completely bypass the Cloudflare Proxy.

2 Likes

Hi! Thanks for the response.

I tried that and got updated content, switching back to proxy and old content again.

I just made a cache rule to bypass when the host matches. It still shows the old content. So it seems to have nothing to do with the caching. But what else could it be? I get updated content with I bypass cloudflare proxy and get old content when using proxy.

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