Problem Statement
What is Incremental Static Regeneration (ISR) in Next.js?
Explanation
ISR allows you to update static pages after deployment by specifying a revalidate value in getStaticProps, which tells Next.js to regenerate the page in the background after that many seconds have passed since the last request. The first user after revalidation time still sees the old page instantly while Next.js regenerates it, and subsequent users see the fresh content, combining the speed of SSG with the freshness of SSR. ISR is perfect for content that updates occasionally but not frequently, like e-commerce products, blog posts, or news articles.
Practice Sets
This question appears in the following practice sets: