Static Site Generation (SSG)
What is Static Site Generation (SSG)?
Static Site Generation, abbreviated SSG, is a build-time approach in which all pages of a site are pre-rendered into static HTML files. These files are then deployed to a CDN and served directly to users without per-request server work. The user always gets fast, cacheable, fully formed pages.
Definition
SSG fits content that does not change for every visitor. A build job pulls data from the commerce backend, CMS, and other sources, renders each page once, and ships the result. Updates require a new build, which can be triggered on a schedule or by webhook events from upstream systems. The architecture is simple, predictable, and cheap to operate.
Why it matters
For commerce, the appeal is performance and cost. Static pages served from a CDN are about as fast as the web allows, and they do not require running infrastructure on every request. Catalogs with stable inventory, brand sites, blogs, and editorial sections benefit most. SEO is straightforward, and risk of runtime failures drops.
Limitations
Pure SSG struggles with frequently changing data such as live stock levels, dynamic prices, or personalization. Large catalogs also produce long build times that complicate release cadence. Modern setups combine SSG with incremental static regeneration, on-demand rendering, and client-side hydration for the few dynamic surfaces that need it, keeping the static benefits without locking the site to slow deploy cycles.
Related
Explore Composable Headless Frontend · Performance and Core Web Vitals.