All articles
Web DevelopmentNovember 19, 2026 6 min read

Partial Prerendering in Production: What Broke, What Held

We shipped Next.js Partial Prerendering to a high-traffic marketing-plus-dashboard app. Here's what actually worked, what silently regressed, and the debugging patterns we wish we'd had on day one.

We turned on Partial Prerendering for a marketing site stitched to an authenticated dashboard, expecting a clean LCP win and a cheaper edge bill. We got both, eventually. We also got a weird class of bugs that only show up when half your page is static and the other half is streamed per request. This is the field report.

What PPR actually does (the one-paragraph version)

Partial Prerendering ships a prerendered HTML shell at request time, then streams in the dynamic holes wrapped in Suspense. The shell comes from the build (or from a background revalidation), and the holes are rendered per request on the server. From the user's perspective it looks like a static page that fills in the personalized bits. From your infra's perspective it means one route can be simultaneously cached and dynamic, which is exactly where our mental model broke.

The mental shift: a route is no longer "static" or "dynamic". It's a static envelope with dynamic inserts, and every Suspense boundary is a contract about where the seam lives.

The first production win: LCP dropped, TTFB stayed flat

Our landing page has a hero, a pricing grid, and a "continue where you left off" card that reads from session. Pre-PPR, the whole route was dynamic because of that one card. Post-PPR, the hero and pricing grid became part of the prerendered shell, and only the card streamed in.

In our logs, LCP on the landing route improved meaningfully for cold visitors (we saw roughly a 30–45% reduction in field LCP over two weeks, but your mileage will depend entirely on how much of your above-the-fold is dynamic). TTFB barely moved because the shell was already fast. INP was unchanged — PPR doesn't help you there, and anyone telling you otherwise is selling something.

The thing nobody warns you about: your shell is a snapshot

The prerendered shell is generated at build time or during revalidation. That means anything you render outside a Suspense boundary is frozen at that moment. We had a <Footer /> that rendered the current year with new Date().getFullYear(). On January 1st, the footer said 2025 until the next deploy. Obvious in hindsight. Humiliating in Slack.

The fix is either to push the date into a dynamic hole or accept that the shell is a build artifact and stop putting runtime-sensitive logic in it.

// app/(marketing)/layout.tsx
import { Suspense } from 'react';
import { CurrentYear } from './current-year';

export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <>
      {children}
      <footer>
        © <Suspense fallback={<span>—</span>}><CurrentYear /></Suspense> 72Technologies
      </footer>
    </>
  );
}
// app/(marketing)/current-year.tsx
import { unstable_noStore as noStore } from 'next/cache';

export async function CurrentYear() {
  noStore();
  return <>{new Date().getFullYear()}</>;
}

The silent regression: a dynamic hole that "became" static

This one cost us a day. We had a component that read a cookie to show the user's plan tier in the nav. It was wrapped in Suspense. It worked in dev. In production, every user saw "Free".

The cause: somewhere in a refactor, the component stopped calling cookies() directly and instead received the plan via a helper that was itself called from a server component higher up — a server component that was outside the Suspense boundary. Next.js, being clever, had hoisted the cookie read into the static shell, decided "no cookies here on the build server", and baked in the default.

PPR's rule is quiet but strict: the dynamic API call has to happen inside the Suspense boundary, not above it. If you read cookies(), headers(), or searchParams above the boundary, you either get a build error (good) or you get a stale value baked into the shell (bad, and currently possible with helper indirection).

How we now audit this

We wrote a small lint rule and a runtime smoke test. The lint rule flags any import of next/headers in a file that isn't itself a Suspense child. The smoke test hits every PPR route twice with different cookie values and diffs the shell versus the streamed chunks:

// scripts/ppr-smoke.ts
import { readFileSync } from 'node:fs';

const routes = JSON.parse(readFileSync('.next/routes-manifest.json', 'utf8'));

for (const route of routes.dynamicRoutes) {
  const a = await fetch(`https://staging.example.com${route.page}`, {
    headers: { cookie: 'plan=free' },
  }).then(r => r.text());
  const b = await fetch(`https://staging.example.com${route.page}`, {
    headers: { cookie: 'plan=pro' },
  }).then(r => r.text());

  const shellA = a.split('<!--$?-->')[0];
  const shellB = b.split('<!--$?-->')[0];

  if (shellA !== shellB) {
    throw new Error(`Shell leaks cookie state on ${route.page}`);
  }
}

That <!--$?--> marker is React's Suspense boundary comment in the streamed output. Diffing the pre-boundary text is a crude but effective way to catch dynamic data leaking into the static shell.

Suspense boundary placement is now an architectural decision

Before PPR, Suspense was mostly about loading UX. After PPR, it's about where the static-dynamic seam lives, and that affects both correctness and performance.

Two patterns we've settled on:

Push boundaries down, not up. A page-level Suspense fallback means the whole page is dynamic. A component-level boundary around just the personalized widget keeps the rest of the page in the shell. Put boundaries as close to the dynamic data as you can.

Don't nest boundaries you don't need. Every boundary is a potential streaming chunk, and the browser has to reconcile each one. We had a dashboard card with three nested boundaries because three different team members added them independently. Collapsing to one fallback reduced visual jank and simplified the loading state.

The fallback shape matters more than you think

The fallback is part of the static shell. If your fallback is a skeleton that's 200px tall and your real content is 400px tall, you get a layout shift when it streams in. We now require that every PPR fallback either matches the final content height or uses min-height to reserve space. CLS went from 0.08 to under 0.02 on our dashboard after enforcing this.

<Suspense fallback={<div className="min-h-[160px] animate-pulse rounded-lg bg-muted" />}>
  <RecentActivity />
</Suspense>

The cache interaction we didn't expect

PPR works with Next.js's cache primitives, but the composition rules are subtle. A fetch with cache: 'force-cache' inside a dynamic hole does not make the hole static — it just means the fetch result is cached. The hole still runs per request to assemble the response. We had an engineer assume that caching every fetch inside a component would "promote" it back into the shell. It doesn't. The presence of cookies() or headers() anywhere in that subtree keeps it dynamic.

The inverse also surprised us: if you have a component with no dynamic APIs but you wrap it in Suspense anyway, Next.js may still prerender it into the shell and ignore the boundary. The boundary is a hint about where dynamism can live, not a command to defer rendering.

What we'd do differently next time

If we were starting over on a PPR rollout, we'd do three things in this order. First, draw the static-dynamic seam on a whiteboard before writing any Suspense boundaries — know which parts of each route depend on request-time data and treat that as the design. Second, add the shell-diff smoke test to CI on day one, not after the first incident. Third, write down a one-page rule for the team: dynamic APIs only inside Suspense children, fallbacks must reserve space, and the shell is a build artifact — nothing time-sensitive lives there.

PPR is a genuine performance primitive, not a config flag you flip. Treat the seam between static and dynamic as a first-class part of your architecture and it pays off. Treat it as magic and it will embarrass you on New Year's Day.

If you're planning a rollout and want a second set of eyes on your route topology, that's the kind of thing our web team does on engagements — or dig through the rest of the blog for more App Router field notes.

#Next.js#React#Performance#App Router

Want a team like ours?

72Technologies builds production software for the kind of teams who actually read this blog.

Start a project