Fix guide · Netlify

Netlify ignored your max-age. Here’s what it does instead.

Netlify treats a deploy as the invalidation event: every new deploy clears the cache for that context. The trap is the opposite of most hosts — a short Cache-Control on a static asset does not shorten edge caching at all.

Visitor's browsertheir own copyCDN edgeCloudflare, Hostinger CDN, QUIC.cloudTHIS GUIDEHost / server cacheLiteSpeed, Varnish, hPanelWordPress plugin cacheWP Rocket, W3TC, WP Super CacheYour actual fileswhat you just published
Netlify's edge holds static assets for up to a year. A deploy, or a tag purge, is what replaces them.

Not sure this is the layer? Paste your URL and the checker reads the headers for you.

Check my site

How to tell what Netlify did

Netlify sets a Cache-Status header on all responses, in the RFC 9211 format. source

"Netlify Edge"; hitServed from Netlify’s edge cache.
"Netlify Edge"; fwd=missNo response found in the cache, so it went to your site.
"Netlify Edge"; fwd=staleThe cached copy was stale and was revalidated.
"Netlify Edge"; hit; fwd=staleA stale copy was served while it revalidated in the background.
"Netlify Durable"; hit; ttl=…Served from the durable cache, with the remaining lifetime.

Three cache-control headers are read, in this order of precedence: Netlify-CDN-Cache-Control, then CDN-Cache-Control, then Cache-Control. source

What Netlify caches by default

How to clear it

  1. Deploy. All new deploys invalidate the cache for that deploy context by default. On Netlify this is the normal purge. source
  2. By tag. Tag responses with Netlify-Cache-Tag: news,blog (or Cache-Tag), then purge from a function: import { purgeCache } from "@netlify/functions" and await purgeCache({ tags: ["news"] }). Calling purgeCache() with no arguments purges the site. source
  3. By API: POST https://api.netlify.com/api/v1/purge with a personal access token and a body of {"site_slug": "yoursite", "cache_tags": ["news"]}. Each tag or site can only be purged twice every five seconds. source

If it still serves the old file

Other fix guides

Sources

Every step above was written from these pages, read on 14 Sep 2026. Vendors move buttons; if one has moved, the source page will say where.

  1. Netlify — Caching overview
  2. Netlify — Custom headers
  3. Netlify — File-based configuration