Match rendering to the page
Product descriptions, live stock figures and account details change at different rates. Rendering all of them from scratch on every request can add work that the page does not need.
Next.js offers several ways to generate and refresh HTML. Choose by asking how fresh each part must be, whether it is personalized and what can be cached.
The three modes in plain terms
Static generation (SSG)
The page is built ahead of time, usually during deployment, and served as a ready file. No database call happens when a visitor arrives. It is the fastest option and the cheapest to run, because a CDN can serve it from close to the visitor.
The catch: the page is only as fresh as the last build. Change the content and you need a new build or another way to refresh it.
Server-side rendering (SSR)
The page is built on the server for each request. It can read cookies, check who is logged in and fetch data that changed a second ago. The price is that every visit waits for that work, and every visit costs server time.
Incremental static regeneration (ISR)
A middle path. The page is served from a static copy, and that copy is rebuilt in the background after a set time or when you tell the system the content changed. Visitors get static speed. The content is at most a few minutes old, or updates as soon as an editor publishes, depending on how you set it up.
There is also plain client-side rendering, where the browser fetches data and builds the view. It belongs to logged-in, interactive screens, not to pages you want indexed.
How the three modes map to the App Router today
SSG, SSR and ISR are the names from the older Pages Router. In the current App Router you rarely pick a mode by name. The framework decides from what the route does, and you shape the result.
- Static by default. A route that reads no request-specific data is prerendered at build time and served as a static result.
- Dynamic when it needs the request. Using request-time APIs such as cookies or headers, or fetching data that must not be cached, makes the route render per request. That is the App Router's equivalent of SSR.
- Revalidation replaces ISR as a concept. You give cached data or pages a lifetime, or invalidate them on demand when content changes, and the next request gets fresh output. Which functions and settings do this depends on whether your project has Cache Components enabled, which is a configuration option in recent versions, so follow the caching and revalidating pages in the documentation for your installed version.
- One route can mix both. With Cache Components, a route can be prerendered as a static shell while uncached parts, wrapped in a loading boundary, stream in at request time. This is how you get the "static shell with dynamic pieces" pattern described below without choosing one mode for the whole page.
The two questions in the next section still decide the outcome. Only the vocabulary and the switches differ.
Two questions that decide most routes
For each route type, ask:
- How often does the content change? Never, daily, every few minutes, or on every request?
- Does it depend on who is looking? Is it the same page for everyone, or personal to the visitor?
If the content is the same for everyone and changes rarely, generate it statically. If it is the same for everyone but changes often, regenerate it incrementally. If it is personal or must be correct to the second, render it on the server or in the client.
Applying it to common page types
Marketing and content pages
Home page, service pages, blog posts, documentation. Same for everyone, edited occasionally. These should be static, refreshed when an editor publishes. Rendering them on every request buys nothing and costs speed.
Product and category pages
This is where most sites get it wrong in one direction or the other. The description, images and reviews change rarely. Price and stock change more often. A good pattern is incremental regeneration for the page itself, with a short refresh window or a refresh triggered when the product changes in the catalog, plus a small client-side request for live stock if it truly has to be exact. You keep static speed for the bulk of the page and accuracy where it matters.
Search results and filtered listings
Endless combinations of filters cannot all be generated ahead of time. Render the main category views statically or incrementally, and handle arbitrary filter combinations on the server or in the client. Be deliberate about which filtered URLs you want search engines to index. Usually it is a short list of meaningful ones, not every permutation.
Dashboards and account areas
Personal by definition and invisible to search engines. Server rendering or client rendering both work. The shell of the page can still be static, with the personal data loading after. Here, perceived speed comes from showing structure immediately and filling in data quickly, not from the rendering mode alone.
Mixing modes on one page
The choice is not always all or nothing for a page. A product page can be served as a static shell with the description, images and structured data, while the stock badge and the "recently viewed" strip load separately. A blog post can be static while its comment count updates on its own. Splitting a page this way keeps the parts that search engines and first-time visitors care about fast and cacheable, and confines the expensive, personal or second-by-second parts to small pieces that can afford to be slower. The rule of thumb: whatever decides ranking and first impression should never wait on the slowest data source on the page.
Caching and revalidation trade-offs
Static and incremental pages move the hard problem from rendering to invalidation. Decide, for each kind of content, what event should refresh which pages. When a product price changes, which pages show that price? The product page, the category page, maybe the home page carousel. If you only refresh one, visitors will see different prices on different pages for a while.
Time-based refresh is simple and forgiving. Event-based refresh, triggered by your CMS or catalog when content changes, is more precise but needs wiring and monitoring. Many sites use both: event-based as the main path and a time-based refresh as a safety net in case an event is missed.
Server rendering avoids invalidation entirely, which is part of its appeal. But it pushes cost and latency onto every single request, and it makes your page speed depend on the slowest data source on the page.
What it does to SEO and Core Web Vitals
Google renders JavaScript reliably, but in a second pass after the first crawl, so rendering can lag behind indexing. Many other crawlers, and most AI bots, do not run JavaScript at all and only see the HTML they receive. Pages that arrive as complete HTML, whether static, regenerated or server-rendered, are indexed faster and more consistently, by more crawlers, than pages assembled in the browser.
Rendering mode also shapes Core Web Vitals. Static and regenerated pages served from a CDN usually give the best time to first byte, which helps Largest Contentful Paint. Server rendering adds the time it takes to fetch data before any byte leaves the server.
But rendering is only part of the story. Layout shifts come from images without dimensions and late-loading banners. Slow interactions come from heavy client JavaScript. A perfectly static page can still score badly if it ships a large bundle and an unoptimized hero image.
Common mistakes
- One mode for everything. Usually server rendering everywhere, chosen for safety, paid for in speed and hosting.
- Static pages with stale prices. Generated once, never refreshed, so the catalog and the site disagree.
- Personal data in cached pages. A server-rendered page cached by a CDN by mistake, showing one user's name to another. Mark personal responses as private and keep them out of shared caches.
- Client-side rendering for indexable content. Product or article pages that render empty HTML and fill in later, then wonder why they rank poorly.
- Blaming the framework for slow APIs. If the product API takes 800 milliseconds, no rendering mode hides that on a request that waits for it. Fix or cache the API.
What this looked like for one store
When we rebuilt an online store's frontend on Next.js, the rendering strategy was chosen per page type, alongside image optimization, multi-layered caching and a CDN. Pages became three times faster on average, and organic traffic grew 87% year over year after the rebuild. The mix was not exotic: marketing and catalog pages were static or regenerated, and only the personal parts were dynamic. The case study has the details.
Review rendering by route type
List your route types: home, content pages, category, product, search, account, checkout. For each one, write down how often its content changes and whether it is personal. That list gives you the rendering mode for each route, and it shows which content needs an event to refresh it. Then measure time to first byte and Largest Contentful Paint for each route type in production, before and after. Our page on Next.js development covers how we approach these decisions on client projects.


