Next.js Rendering Explained: Static, Server and Cached Pages in Plain English

By Seahawk November 15, 2026 6 min read

In current Next.js, a page is no longer either static or dynamic as a whole. Each part of a page is one of three things. Static content is rendered once at build time. Cached content is rendered on the server and reused for a period you choose. Request-time content is rendered fresh for every visitor and streamed into the page. Next.js sends the static and cached parts immediately and fills in the rest as it becomes ready.

This model is called Cache Components. As of Next.js 16.4, released in October 2026, it is enabled by default in new projects and the Next.js team recommends it for every app. Here is how each kind of rendering works and when to use it.

The Three Kinds of Content

KindWhen the work happensHow a developer marks itUse it for
StaticOnce, at build timeNothing. It is automaticLayout, navigation, headings, text stored in the code
CachedOn the server, then reused until its lifetime ends'use cache' plus a lifetimeCMS content, product listings, anything that is the same for everyone but changes sometimes
Request-timeOn every requestWrapped in <Suspense> with a fallbackCarts, account details, anything that depends on cookies or must be live

The static and cached parts together form what Next.js calls the static shell. It can be served straight from a CDN without touching your server. The technique of sending that shell first and streaming the rest is called Partial Prerendering.

Static Rendering

If a component only imports modules, reads local files synchronously or does pure calculations, Next.js renders it during next build and stores the HTML. No setting is needed.

Use it for everything that changes only when you deploy: the header and footer, marketing copy written in the code, and the frame of each page. Static output is the cheapest and fastest thing a site can serve, because the work has already been done.

Cached Rendering

Most real content comes from a database or a CMS, and reading it is asynchronous. To have Next.js store the result, a developer adds the 'use cache' directive to a function or component and gives it a lifetime:

import { cacheLife, cacheTag } from 'next/cache'

export async function getProducts() {
  'use cache'
  cacheLife('hours')
  cacheTag('products')
  return db.query('SELECT * FROM products')
}

cacheLife accepts a named profile or custom values. These are the built-in profiles, from the revalidation documentation:

ProfileRevalidates afterExpires after
default15 minutesNever
seconds1 second60 seconds
minutes1 minute1 hour
hours1 hour1 day
days1 day1 week
weeks1 week30 days
max30 days1 year

Revalidation means Next.js refreshes the entry in the background after that time. Visitors keep getting the stored copy while that happens.

One detail catches people out. A very short lifetime, such as the seconds profile or an expiry under five minutes, is left out of the prerendered shell and treated as request-time content.

Request-Time Rendering

Some content cannot be prepared in advance because it depends on who is asking. Reading cookies, request headers or URL search parameters, or fetching data without a cache directive, makes a component request-time.

Next.js requires these components to sit inside a <Suspense> boundary with a fallback:

import { Suspense } from 'react'
import { cookies } from 'next/headers'

async function Greeting() {
  const name = (await cookies()).get('name')?.value
  return <p>Welcome back, {name}</p>
}

export default function Page() {
  return (
    <>
      <h1>Your account</h1>
      <Suspense fallback={<p>Loading...</p>}>
        <Greeting />
      </Suspense>
    </>
  )
}

The heading and the fallback go into the static shell. The greeting is rendered when the request arrives and streamed in. If a developer forgets the boundary, the development overlay reports a blocking route and points to the fix.

This is the main change from older versions. Previously, one call to cookies() switched the whole route to dynamic rendering. Now it affects only the component that reads the cookie.

Keeping Cached Content Fresh

A lifetime handles updates on a timer. For updates on demand, tag the cached data with cacheTag and invalidate the tag when something changes. Next.js offers three functions:

FunctionWhat it doesTypical use
revalidateTag('products', 'max')Serves the old copy while a fresh one is built in the backgroundA CMS webhook after an editor publishes
updateTag('products')Expires the entry at once. Works only in Server ActionsA user saves a form and must see the change immediately
revalidatePath('/shop')Invalidates everything cached for one routeWhen you do not know which tags a page uses

For content managed in a CMS, the documented pattern is a long lifetime such as max, a tag, and a webhook that calls revalidateTag. Pages stay in the static shell and are refreshed soon after a change, without a timer rebuilding content that has not changed. Our glossary entry on cache invalidation explains the general idea.

How to Choose for Each Part of a Page

Ask two questions about each block on the page.

  1. Is it the same for every visitor? If not, it is request-time. Put it in a Suspense boundary and design a sensible fallback.
  2. If it is the same for everyone, does it change between deployments? If not, leave it static. If it does, cache it, pick a lifetime that matches how stale it is allowed to be, and tag it.

On a product page, that usually gives you a static layout, a cached description and price list, and request-time cart and stock badges.

For marketing sites and blogs that should never render at request time, Next.js 16.4 added a guard. Exporting ensureStatic = 'navigation' from a page or layout fails the build if any request-time content slips in.

Turning It On, and the Older Model

Projects created with the recommended create-next-app defaults already use Cache Components. Existing apps enable it in the config file:

import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  cacheComponents: true,
  partialPrefetching: true,
}

export default nextConfig

Without that flag, a Next.js 16 app uses the previous model, which the docs still cover. There, a route is prerendered unless it uses request data, fetch calls are not cached unless you pass cache: 'force-cache' or next: { revalidate: 3600 }, and whole routes are tuned with exports such as export const dynamic = 'force-dynamic' and export const revalidate = 60.

Both models work in Next.js 16. The Next.js team has said Cache Components will be the default in Next.js 17, so new work should use it. The full reference is the caching guide.

What This Means for Hosting

Rendering choices have hosting consequences, and they are worth raising before launch.

  • It is not tied to one platform. Cache Components works when you self-host with next start or in a Docker container.
  • Streaming must not be buffered. If Nginx or another proxy holds the response until it is complete, visitors get the shell and the dynamic parts together and lose the speed benefit. The self-hosting guide shows how to send the X-Accel-Buffering: no header for Nginx.
  • Several servers need a shared cache. By default each Next.js instance keeps its own cache in memory and on disk. Behind a load balancer, one server may show new content while another shows old content until you configure a shared cache handler.
  • Each deployment starts with an empty cache. Cached entries do not carry over between deployments.

The more of each page that is static or cached, the less work your server does per visit and the lower the time to first byte. If you would like help auditing a Next.js build, talk to our Next.js development team, or browse more Next.js articles.

SeaPHP

Mission-critical PHP services and Next.js migrations.

Complex upgrades for PHP applications and websites. PHP-to-Next.js migrations for what comes next.