1. What is Incremental Static Site Generation (iSSG)?
Incremental static site generation, aka incremental static regeneration (ISR), is a pattern added to static site generation that allows updating of existing pages and adding new ones, by pre-rendering a subset of pages in the background even while receiving new requests for pages
2. How does Incremental Static Site Generation (iSSG) work?
- it allows adding new pages by creating and caching them on demand
- and updating existing pages using the stale-while-revalidate mechanism
3. What are the Pros and Cons of Incremental Static Site Generation (iSSG)?
- dynamic data without a full rebuild
- as fast as SSG in the best case
- fairly recent page available even if regeneration fails
- stale data
- users of existing pages see stale data
- breaks atomic and immutable deployment and rollback
- difficult to debug due to stale-while-revalidate caching
4. When should you use Incremental Static Site Generation (iSSG)?
- when you want to do static site generation, but the build is too often or takes too long
- when showing stale content or different content to different users is not a problem
Perfect for sites with millions of pages like e-commerce and big content websites