ISR for shared HTML

Serve shared marketing pages from ISR, not a render per request.

From nextjs-pagespeed.

Per request vs. ISR

Press CMS edit, then watch the ISR side.

t = 0:00
Rendered per requestSlow TTFB
Median TTFB
–
Origin renders
0
Outdated
0
    export const dynamic = "force-dynamic"
    ISREdge cache
    Median TTFB
    –
    Origin renders
    0
    Outdated
    0
      export const revalidate = 60
      • Origin render
      • Cache hit
      • Stale hit + regen
      • Window
      • CMS edit
      export const revalidate = 60;
      
      export default async function PricingPage() {
        const plans = await getPlans();
        return <Pricing plans={plans} />;
      }

      Does this page qualify?

      Pick a page or set the inputs.

      The pageInputs
      1 hour
      RecommendationISR

      ISR, revalidate = 3600

      Renders / hour
      –
      Typical TTFB
      –
      Worst staleness
      –

      Why it matters, pros and cons

      Why it matters

      A marketing page is the same for everyone; rendering it per request wastes TTFB.

      Pros

      • Edge TTFB in tens of milliseconds.
      • At most one origin render per window.
      • Failed rebuilds keep the last good page.

      Cons

      • One visitor per window sees the old version.
      • Never for per-user HTML; caching it leaks.
      • Low traffic: revalidatePath() on CMS publish instead.