Quiz
Warm-up from 'After the write: revalidate and pending states': what does revalidatePath("/blog") actually do?
When is a page rendered?
Everything in Units 4 and 5 boils down to one question per page: when does the server run your components? Three answers exist:
- Static. Rendered once at build time (
next build). Every visitor gets the same prebuilt HTML instantly. Think: marketing pages, docs, blog posts viagenerateStaticParams. - Dynamic. Rendered on every request. Always fresh, always personal, but the visitor waits for the render. Think: dashboards, carts, anything reading cookies.
- ISR (Incremental Static Regeneration). The hybrid: served static, but re-rendered in the background after a time window (
revalidate: 60). Visitors always get instant HTML that is at most a little stale.
Quiz
A news homepage must load instantly for millions of readers but should show new headlines within about a minute. Which strategy fits best?
Problem
Classify this page: a shopping-cart page that reads the user's session cookie to show their items. Static, dynamic, or ISR? (one word)