advanced

Partial prerendering concepts

Combine a static shell with dynamic holes when a route has both stable and request-specific regions.

Partial Prerendering (PPR) combines a static shell prerendered at build time with dynamic holes filled at request time. Marketing chrome and navigation can stay cached while personalized or auth-gated regions stream in.

Think: stable layout and hero static; recommendations or account badge dynamic inside Suspense boundaries configured for PPR.

On interviews: explain why splitting static and dynamic regions beats choosing only SSR or only SSG for mixed pages.

Common pitfalls: marking too much as dynamic and losing cache benefits, or prerendering user-specific holes by mistake.

The trade-off is operational complexity of boundary ownership versus optimal LCP plus personalization.

Checklist:

  • Identify stable versus request-specific regions.
  • Keep dynamic holes behind Suspense.
  • Validate cache headers for the static shell.
  • Test auth-gated holes do not leak in static output.