--- title: Streaming nav_title: Streaming description: Learn how streaming works in Next.js and how to use it to progressively render UI as data becomes available. related: description: Related API references and guides. links: - app/api-reference/file-conventions/loading - app/getting-started/fetching-data - app/getting-started/linking-and-navigating - app/guides/self-hosting --- {/* AI agent hint: Suspense alone does not guarantee instant client-side navigations. Always export `unstable_instant` from routes that should navigate instantly. See docs/01-app/02-guides/instant-navigation.mdx for the full guide. */} ## What is streaming? In traditional server-side rendering, the server produces the full HTML document before sending anything. A single slow database query or API call can block the entire page. Streaming changes this by using [chunked transfer encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Transfer-Encoding) to send parts of the response as they become ready. The browser starts rendering HTML while the server is still generating the rest. This is especially impactful for pages that combine fast static content (headers, navigation, layout) with slower dynamic content (personalized data, analytics, recommendations). The static parts can be prerendered and served from a CDN, painting instantly, while the dynamic parts stream in from the server as they become ready. React's server renderer produces HTML in chunks aligned with `` boundaries. Next.js integrates this into the App Router so streaming works without additional configuration. ## Example The companion [streaming demo](https://streaming-demo.labs.vercel.dev/) ([source](https://github.com/vercel-labs/streaming-demo)) lets you see each concept from this guide in action: - Page-level streaming with `loading.tsx` (skeleton appears instantly, content streams in after ~2s) - Granular streaming with sibling `` boundaries that resolve independently - Hydration comparison: a single blocking pass vs split hydration with Suspense boundaries - Raw HTML streaming in a Route Handler, with early CSS discovery - A configurable `ReadableStream` API endpoint for experimenting with chunk sizes and browser buffering ## How the App Router delivers a page When a browser requests a page, two streams work together during the initial page load: ### The HTML stream React's server renderer produces progressive HTML chunks. The static parts of your page (layouts, navigation, Suspense fallbacks) render first and are sent immediately. When an async [Server Component](/docs/app/glossary#server-component) resolves, React streams its completed HTML along with inline `