Skip to content

Cloudflare caches old HTML, deployment is live but visitors see old pages

Cloudflare's edge cache sits in front of your origin and respects Cache-Control headers. Without one, or with the wrong one, a page stays cached merrily for hours. Purge surgically, not the whole site.

Try this first

  1. 1First line: use 'Purge by URL' in the Cloudflare dashboard for the specific pages you just deployed.
  2. 2Use tags (Cache-Tag header) or Cache-Key rules so a single purge call can invalidate everything of a type (e.g. blog or product).
  3. 3For JS/CSS assets use filename versioning (app.abc123.js), then no purge is needed because the path differs.
  4. 4For HTML send Cache-Control: public, max-age=0, must-revalidate or a short s-maxage with stale-while-revalidate, not 1 day.
  5. 5With Next.js on Vercel behind Cloudflare: set Cloudflare to DNS-only (grey cloud) or disable APO, double caching is a headache.

When to bring us in

If you keep getting stale cache after every deploy, we can set up cache headers and purge strategy properly once.

See also

None of the above fits?

Describe your situation below. We pass your input plus the steps you already saw to our AI and return tailored next-step advice. If it's too risky to DIY, we'll say so.

Who are you?

For the AI question we need your email and company, so we can follow up if the AI gets stuck, and to prevent abuse.

Limited to 2 questions per hour and 5 per day, kept lean so the AI stays useful. For more, contacting us directly works better for you and us.

Or skip the DIY entirely

Our Managed IT clients do not look these things up. One point of contact, a fixed monthly price, resolved within working hours.