skyg profile picture

skyg

Software developer


Faster Next.js sites with stale-while-revalidate

Using the `stale-while-revalidate` Cache-Control header in a Next.js application can be a boon for page load times, especially when combined with a CDN like Cloudflare. A cached "stale" page is served while the CDN calls your server in the background.