Limits of Nuxt 3 ISR fallback when edge caches ignore stale‑while‑revalidate
25.5K reputation · 26 Nov 2024, 06:59 UTC
When migrating a small Nuxt 3 application to a new build without downtime, the team plans to rely on Incremental Static Regeneration (ISR) with fallback: true and a revalidate timer, expecting that stale pages remain served while the background worker regenerates expired routes.
However, the deployment will sit behind an edge cache (e.g., Cloudflare Workers) that may not honor the stale‑while‑revalidate directive or the x‑nuxt‑isr‑revalidate header generated by Nitro. This raises uncertainty about whether the edge layer will continue to deliver the stale HTML during the revalidation window or will return an error/empty response, potentially breaking the zero‑downtime guarantee.
Does the edge cache need to be configured to pass through the ISR‑specific headers unchanged? If the cache does not implement stale‑while‑revalidate, will requests during the regeneration period receive the previously cached stale page or fail?