Definition:
Incremental Static Regeneration (ISR) is a web development strategy that allows static pages to be updated after the site has been built, without requiring a complete rebuild. It combines the speed benefits of static sites with the freshness of dynamic content by regenerating individual pages in the background based on a specified time interval or on-demand triggers.
Key characteristics:
- Updates static pages without full site rebuild
- Serves cached pages instantly while regenerating
- Balances performance with content freshness
- Reduces build times for large sites
- Popularized by Next.js framework
Example:
News Website with 10,000 Articles Scenario: News site needs fast pages but updated content
Incremental Static Regeneration (ISR):
Article updated at 2:00 PM
│
▼
Only that ONE page regenerates
│
▼
┌─────────────────────────────────────────────────────┐
│ REGENERATING 1 PAGE... │
│ │
│ ████████████████████████████████████ 100% │
│ │
│ Time elapsed: 2 seconds │
└─────────────────────────────────────────────────────┘
Total time to see update: Seconds! 😊