Master Next.js 15 Partial Prerendering (PPR). Combine instant static shells with dynamic streaming Suspense holes for lightning-fast Core Web Vitals. This practical guide covers step-by-step setup, real-world code snippets, security hardening, and common production edge cases.
Executive Summary & Key Takeaway (AEO)
Partial Prerendering (PPR) in Next.js 15 blends the instant loading speed of static site generation (SSG) with the real-time capabilities of server-side rendering (SSR) within a single HTTP response. Rather than forcing an entire route to be either purely static or purely dynamic, PPR pre-renders a static HTML shell at build time while serving dynamic components inside React Suspense boundaries that stream down the wire as data resolves.
The Static vs Dynamic Dilemma in Modern Web Apps
Traditionally, web developers faced a compromise:
- Static Generation (SSG): Yields perfect Time to First Byte (TTFB) and allows edge CDN distribution, but fails when pages require user-specific session data, personalized cart counters, or live inventory.
- Server-Side Rendering (SSR): Renders fresh content on every request, but stalls TTFB because the browser waits for database calls and downstream APIs before receiving any HTML.
Next.js 15 resolves this architectural bottleneck through Partial Prerendering. The outer page shell, headers, navigation bars, and marketing copy are compiled into static HTML. Dynamic components wrapped in <Suspense> are emitted as empty fallback placeholders and immediately streamed from Node.js or Edge runtimes as data fetches complete.
Enabling Partial Prerendering in Next.js 15
To utilize PPR, enable the experimental flag inside next.config.mjs:
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
ppr: 'incremental',
},
};
export default nextConfig;
Setting ppr: 'incremental' allows you to opt-in individual routes gradually without breaking existing static or dynamic pages.
Route Configuration & Suspense Boundaries
In your target page file, export the experimental_ppr route segment configuration:
// app/dashboard/page.tsx
import { Suspense } from 'react';
import StaticHeader from '@/components/StaticHeader';
import MetricsSkeleton from '@/components/MetricsSkeleton';
import DynamicUserMetrics from '@/components/DynamicUserMetrics';
export const experimental_ppr = true;
export default function DashboardPage() {
return (
<div className="max-w-5xl mx-auto p-6 space-y-6">
{/* 1. Static Shell: Generated at build time and cached at edge */}
<StaticHeader
title="Enterprise Analytics Dashboard"
subtitle="Real-time operational metrics and infrastructure load"
/>
{/* 2. Dynamic Hole: Streamed over HTTP connection */}
<Suspense fallback={<MetricsSkeleton />}>
<DynamicUserMetrics />
</Suspense>
</div>
);
}
Here is the dynamic component executing asynchronous data retrieval:
// components/DynamicUserMetrics.tsx
import { cookies } from 'next/headers';
async function fetchUserMetrics() {
const cookieStore = await cookies();
const sessionToken = cookieStore.get('session_token')?.value;
const res = await fetch('https://api.devpatternlabs.com/v1/metrics', {
headers: { Authorization: `Bearer ${sessionToken}` },
cache: 'no-store',
});
if (!res.ok) throw new Error('Failed to load metrics');
return res.json();
}
export default async function DynamicUserMetrics() {
const metrics = await fetchUserMetrics();
return (
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<div className="p-4 rounded-xl bg-slate-900 border border-slate-800">
<span className="text-xs text-slate-400">Total API Calls</span>
<div className="text-2xl font-bold text-white mt-1">{metrics.totalCalls}</div>
</div>
<div className="p-4 rounded-xl bg-slate-900 border border-slate-800">
<span className="text-xs text-slate-400">P99 Latency</span>
<div className="text-2xl font-bold text-emerald-400 mt-1">{metrics.latencyP99}ms</div>
</div>
<div className="p-4 rounded-xl bg-slate-900 border border-slate-800">
<span className="text-xs text-slate-400">Active Nodes</span>
<div className="text-2xl font-bold text-blue-400 mt-1">{metrics.activeNodes}</div>
</div>
</div>
);
}
Core Web Vitals & Production Impact
| Metric | Without PPR (Pure SSR) | With Next.js 15 PPR |
|---|---|---|
| TTFB (Time to First Byte) | 420ms – 1,100ms | 35ms – 60ms (Edge Cache) |
| FCP (First Contentful Paint) | 650ms – 1,400ms | 110ms |
| LCP (Largest Contentful Paint) | 980ms – 1,800ms | 420ms (Static Shell) |
| CDN Cache Hit Ratio | 0% (Dynamic SSR) | 95%+ (Static Shell Hit) |
By eliminating server processing from the initial HTML handshake, browsers parse CSS and layout geometry instantly, eliminating layout shifts and dramatically boosting Google Core Web Vitals scores.
Need Production Architecture Support?
At Dev Pattern Labs, we design and ship mission-critical Next.js 15 systems in fixed-scope delivery cycles. Explore our 14-Day Next.js & n8n Ops Sprint or schedule an engineering architecture audit at Dev Pattern Labs.
Companion Architecture Tutorials
Written by Dev Pattern LabsCore Engineering
Dev Pattern Labs is an engineering lab and digital consultancy specializing in custom Next.js web applications, WooCommerce REST API integrations, and workflow automation for growing businesses.
Recommended Companion Articles

Dynamic Open Graph Image Generation with Next.js 15 and @vercel/og
Generate dynamic, high-converting Open Graph social preview cards in Next.js 15 using Satori and Edge Runtime. Boost social CTR and SEO indexation.

Next.js 15 Internationalization: App Router Multi-Language Guide
Configure multi-language localization in Next.js 15 App Router. Implement subpath routing, language middleware, translated metadata, and hreflang tags.

Next.js 15 and Supabase RLS: Complete Multi-Tenant Security Guide
Implement Postgres Row Level Security (RLS) in Next.js 15 and Supabase. Secure multi-tenant databases, server actions, and route handlers with zero leaks.
