Overview - On-demand revalidation
What is it?
On-demand revalidation in Next.js is a way to update static pages after they have been built and served. Instead of rebuilding the entire site or waiting for a scheduled update, you can trigger a specific page to refresh its content when needed. This helps keep pages fresh without slowing down users with long build times.
Why it matters
Without on-demand revalidation, static pages can become outdated until the next scheduled rebuild, causing users to see stale content. This can hurt user experience and business goals, especially for dynamic data like news or product info. On-demand revalidation solves this by letting developers update pages instantly when data changes, keeping content accurate and timely.
Where it fits
Before learning on-demand revalidation, you should understand Next.js static generation and incremental static regeneration (ISR). After mastering this, you can explore advanced caching strategies and serverless functions to optimize content delivery and update triggers.