Skip to main content

Advanced Data Fetching & Caching

ISR and On-Demand Revalidation

0:00
LearnStep 1/4

Understanding ISR

Incremental Static Regeneration

ISR gives you the performance of static with the freshness of dynamic. Pages are statically generated, then regenerated in the background when data changes.

How ISR Works

Time-Based ISR

tsx

The Stale-While-Revalidate Pattern

Key Insight: Users never wait for regeneration. They always get an instant response (possibly stale), while the new version generates in the background.

ISR with Dynamic Params

tsx