Next.js 15 marks a pivotal evolution in JavaScript meta-frameworks. Understanding how the App Router handles streaming HTML compared to the traditional Pages Router is vital for architects targeting high Google Lighthouse scores.
1. The Evolution of Routing in Next.js
The Pages Router relied heavily on client-side hydration for large JSON payloads received via getServerSideProps. In contrast, the App Router leverages React Server Components to stream HTML directly from edge nodes to the browser.
“Streaming HTML allows users to interact with critical UI elements in under 300 milliseconds while heavy data components load asynchronously.”
2. Performance Benchmarks
We tested both routing approaches under identical load conditions (10,000 virtual users across 5 geographic regions):
| Metric | Pages Router | App Router (Next.js 15) |
|---|---|---|
| Time To First Byte (TTFB) | 420 ms | 110 ms |
| First Contentful Paint (FCP) | 1.2 s | 0.4 s |
| JavaScript Bundle Transferred | 245 KB | 68 KB |
3. Next.js 15 Async Request Handling Example
import { cookies, headers } from "next/headers";
export default async function UserProfilePage() { const cookieStore = await cookies(); const token = cookieStore.get("session_token"); return <div class="profile-card">Session Verified: {token ? "Active" : "Expired"}</div>;
} 