Course contentsShow
← React
Lesson 1677 of 2,39640. Server-Side RenderingFree lesson

SSG Trade-offs: Speed vs Freshness

When SSG is right: marketing sites, blogs, docs, product pages—content that changes infrequently.

SSG Trade-offs: Speed vs Freshness

You'll learn when Static Site Generation (SSG) is the right rendering strategy and why it dominates certain content types.

The Core Trade-off

SSG gives you blazing fast pages—everything is pre-built at build time and served as static HTML. But there's a catch: your content is frozen at the moment you build. If your data changes after deployment, users see stale content until you rebuild and redeploy.

Think of it like a printed menu at a restaurant versus a digital display. The printed menu is instant to read (fast!), but if the chef adds a new dish, you need to print new menus. The digital display can update in real-time, but requires power and processing on every view.

When SSG Wins

SSG is perfect for content that changes infrequently:

  • Marketing sites: Your homepage, about page, pricing page—these rarely change, and when they do, a rebuild is fine
  • Blogs: Posts don't change after publishing (or change rarely enough that rebuilding is acceptable)
  • Documentation: Docs update with releases, not constantly
  • Product pages: Individual product details that are stable

The pattern: if your content updates on a deployment schedule rather than a user interaction schedule, SSG is ideal.

The Speed Advantage

SSG pages load as fast as the CDN can deliver them—no server processing, no database queries, no waiting. Your Time to First Byte (TTFB) is measured in milliseconds globally.

The Freshness Problem

If you need to show live data (stock prices, user comments, real-time inventory), SSG alone won't work. You'd need to combine it with client-side fetching or choose SSR instead.

Key Takeaway: Choose SSG when blazing-fast delivery matters more than real-time accuracy—marketing sites, blogs, docs, and product catalogs are the sweet spot.