Cloudflare is returning outdated contents

I am using Cloudflare Pages to host my website. One day, after making a major update to the framework I’m using, I noticed that accessing the site resulted in unstable behavior where different content (old content) was being displayed.

Here is the situation:
Reproducible URL: https://ky-y.dev

The domain is managed by Cloudflare, and it is set to DNS Only mode.

I initially had Cache-Control set to public but changed it to no-cache. This change was reflected immediately. However, cf-cache-status remains HIT. I haven’t set any special rules for the cache.

When Cache-Control was set to public, cf-cache-status was DYNAMIC. However, the content remained outdated.

Also, with the *.pages.dev provided by Cloudflare Pages by default, I do not experience such issues, and I always get the latest content.

Are you certain that the page isn’t served from browser cache? I don’t even get cf-cache-status headers at all.

Can you show a screenshot of this page from browser dev tools?

Thank you for your response. From the access logs I’ve reviewed, it seems that what you’ve obtained is likely the latest version of the content.

Upon multiple reloads, it shows unstable behavior where sometimes the latest content is retrieved, and other times outdated content is retrieved. Here is the result from my Network tab:
I’ve cleared the cache for the entire site for all periods.

In my environment as well, when I manage to retrieve the latest version, I get results similar to the screenshot you provided.

Have you also cleared Cloudflare’s Cache?

I have executed Purge Everything multiple times.

Strange. Have you tried redeploying the site?

I have tried the following:

  1. Removed the custom domain from Pages.
  2. Deleted the Pages project.

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