Blogs
Server-Side Rendering vs Static Generation
Content Editor · October 24, 2025 · 9 min read
Direct answer
How do I decide between SSR and SSG for a mixed site?
Start with SSG for static routes (marketing pages, docs, blogs) and use ISR for periodic updates. Reserve SSR for authenticated or highly personalized views and fast-changing data. Measure Core Web Vitals and TTFB during tests. Decision factors include content freshness, personalization needs, and caching strategy.
Server-Side Rendering vs Static Generation Choosing between Server-Side Rendering vs Static Generation can make or break performance, SEO, and developer velocity. In SSR, HTML is rendered on every request; in SSG, HTML is prebuilt at compile time and served from the edge/CDN. Goo...
Server-Side Rendering vs Static Generation
Choosing between Server-Side Rendering vs Static Generation can make or break performance, SEO, and developer velocity. In SSR, HTML is rendered on every request; in SSG, HTML is prebuilt at compile time and served from the edge/CDN.
Google highlights Core Web Vitals (LCP, INP, CLS) as key signals, so your decision should align with what gets users a stable, fast first view and responsive interactions. SSR shines for personalized, fast-changing data and gated content; SSG excels for marketing pages, docs, blogs, catalogs and anything that can be cached globally. Frameworks such as Next.js and Nuxt support both modes and hybrid patterns like Incremental Static Regeneration (ISR) so you don’t have to choose one for your whole site.
This guide provides a field-tested decision framework, examples, and a checklist to pick the right approach for each page. (See references: Next.js docs on two pre-rendering forms and SSG/ISR; Google on Core Web Vitals.) Google for Developers+4Next.js+4Next.js+4
What do SSR and SSG actually do?
SSR (Server-Side Rendering)
With SSR, the server generates fresh HTML on every request. That means each user gets up-to-date content by default. It’s ideal when data changes every request (think: dashboards, carts, prices, inventory behind auth). Next.js describes SSR as HTML generated per request; Nuxt and Vue SSR guides echo the same model.
Pros
-
Fresh data by default; no staleness windows
-
Great for personalization and A/B testing
-
Straightforward gating/authorization
Cons
-
Higher TTFB under load; requires server capacity and scaling
-
More moving parts to keep reliable (compute, caching, origin availability)
-
CDN caching is less effective unless you design surrogate keys & cache rules

SSG (Static Site Generation)
With SSG, HTML is prebuilt at build time and then served like static files, usually from a global CDN. Next.js defines SSG as build-time pre-rendering reused on each request; Gatsby’s docs outline benefits like resilience to traffic spikes and simpler infra.
Pros
-
Ultra-fast TTFB from the edge; excellent cacheability
-
Fewer runtime dependencies; high reliability (origin-down tolerance)
-
Predictable costs; easy to scale globally
Cons
-
Data can go stale between builds
-
Long builds on large catalogs unless you shard or use ISR
-
Complex invalidation if content changes frequently
Key idea
Server-Side Rendering vs Static Generation isn’t an either/or. Most modern frameworks let you mix them per route and even adopt ISR to update static pages in the background.
The hybrid middle ground: ISR (Incremental Static Regeneration)
ISR keeps the speed of SSG while letting pages regenerate on a timer or on-demand. It’s essentially static caching with scheduled or triggered re-renders users keep getting fast static pages, and the framework refreshes in the background. Next.js and Vercel describe ISR as updating static content without full rebuilds; recent explainers make the caching model explicit.

Use ISR when
Content updates periodically (minutes to hours)
You have many pages (large catalogs, blogs, docs) and want short builds
You want to avoid complex server fleets but still keep content “fresh enough”
How SSR and SSG affect Core Web Vitals (SEO & UX)
Google’s Core Web Vitals LCP, INP, CLS capture loading, interactivity, and visual stability. Good scores align with better search visibility and user engagement.
SSG advantage
Static HTML at the edge lowers latency and usually improves LCP. Stable, CDN-served markup helps CLS if you avoid late-loading layout shifts.
SSR caveat
Fresh HTML per request can increase TTFB, which indirectly impacts LCP. Proper caching (HTML and data), streaming, and edge rendering can mitigate this.
Hydration & interactivity
For both Server-Side Rendering vs Static Generation, client-side JS size, hydration strategy, and code-splitting determine INP (formerly FID successor).
Bottom line
If the page is largely static, SSG (or ISR) typically yields stronger Web Vitals with less ops overhead. When personalization or live data is core to value, SSR with aggressive caching, partial hydration, and edge-compute can still achieve strong vitals.
Decision framework: When to pick Server-Side Rendering vs Static Generation
Use this quick rubric to decide per page/route.
| Criterion | Prefer SSG (or ISR) | Prefer SSR |
|---|---|---|
| Data change frequency | Hours/days | Seconds/minutes |
| Personalization | None or minimal | High (per-user) |
| Auth/Gated content | Public | Private, role-based |
| SEO crawlability | Strong (static HTML) | Strong (static HTML) |
| TTFB sensitivity | Very sensitive | Acceptable with caching |
| Ops complexity | Lowest (CDN) | Higher (servers/edge) |
| Catalog size | Huge → use ISR/partial builds | Medium with dynamic backends |
Rules of thumb
Marketing, docs, blog, pricing, landing pages
SSG/ISR.
Dashboards, carts, stock/price tickers, personalized feeds
SSR (plus client caching).
Large catalogs (e-commerce, marketplaces)
Start with SSG + ISR; use SSR for ultra-fresh sub-routes (e.g., live price widget).
Docs & knowledge bases
SSG; rebuild or ISR on publish.

Framework notes (Next.js, Nuxt)
Next.js
Two pre-rendering forms (SSG & SSR) + ISR + per-route selection (Pages/App Router). Use CDN caching headers and revalidation for ISR.
Nuxt 3
Offers SSR, SSG, hybrid modes, and SWR-style caching; hybrid rendering can mix per-route strategies.
Real-life examples
Example 1 B2B SaaS marketing site
A B2B vendor migrated its marketing pages and docs to SSG with ISR. Result: lower hosting cost, better global TTFB, and fewer incidents. Publishing triggers revalidation of key routes; everything ships from CDN. (Pattern validated by Next.js docs on SSG/ISR.)
Example 2 E-commerce product detail pages
The catalog uses SSG+ISR for PDPs updated hourly; cart/checkout run SSR behind auth. Prices in PDPs use a client-fetched API that updates on mount, while the rest stays static for speed. (Matches guidance on mixing modes.)
In both cases, the organization evaluated Server-Side Rendering vs Static Generation per route, not per app.
Implementation checklist (per page)
-
Pick mode
Decide Server-Side Rendering vs Static Generation based on data staleness & personalization. -
Cache smartly
-
SSG: Ensure long-TTL CDN caching, immutable assets.
-
SSR: Add HTML caching (vary by cookie if needed), ESI/surrogate keys.
-
-
Measure vitals: Track LCP/INP/CLS with field data (CrUX, web-vitals lib). web.dev
-
Hydration strategy: Code-split, lazy-hydrate non-critical widgets.
-
Images: Use modern formats (AVIF/WebP), responsive
. -
ISR: Set
revalidatewindows based on business freshness. -
Security: For SSR pages with auth, avoid caching sensitive HTML.
-
Monitoring: Alert on TTFB spikes and revalidation failures.
Common pitfalls to avoid
-
Treating the whole app as SSR “just in case.” Use SSR surgically.
-
Letting SSG pages go stale when the business needs fresher data use ISR.
-
Ignoring Core Web Vitals; rendering choice must serve LCP/INP/CLS goals.

Bottom Lines
For pages with stable content and high traffic, Static Generation (often with ISR) usually wins on speed, cost, and reliability. For highly personalized or rapidly changing content, Server-Side Rendering delivers freshness and control provided you cache wisely and monitor performance. Most modern sites benefit from a hybrid approach: default to SSG/ISR and escalate to SSR only where it truly adds value. Use the decision framework, measure Core Web Vitals, and iterate. That’s how you reliably pick Server-Side Rendering vs Static Generation for every page in 2025.
CTA
Want a route-by-route rendering strategy for your site? Share your sitemap and content update patterns I’ll map each URL to SSG, ISR, or SSR with caching rules.
Frequently asked questions
Quick answers related to this article.
Comments
Join the discussion. Comments are moderated.
No comments yet. Be the first to share a thought.
Building something related?
Tell us about your product goals — we’ll respond with a clear next step.
Discuss your project