Static Site Generation

Digital & Tech Web Development

Pre-building all pages at build time for maximum performance.

Definition

Static Site Generation (SSG) is a web development approach where pages are pre-rendered as static HTML files at build time rather than on-demand. These files are then served directly from a CDN, providing maximum performance and security.

SSG frameworks like Astro, Gatsby, and Eleventy build sites by fetching data from APIs, databases, or content management systems at build time, generating HTML for all possible pages.

Why It Matters

Static sites load instantly because there's no server processing or database queries at runtime. They're also more secure (no server-side code to exploit) and cost-effective to host (simple file serving).

SSG is ideal for content sites, documentation, blogs, and marketing pages that don't require real-time data. Combined with incremental builds, SSG scales to thousands of pages while maintaining instant load times.

Examples in Practice

A documentation site with 1,000 pages built with SSG generates all HTML during deployment, serving each page as a static file from a CDN. Changes to one page trigger a rebuild of just that page.

E-commerce product catalogs use SSG for product pages that change infrequently, pre-building pages for better SEO and performance while using JavaScript to add cart functionality.

Explore More Industry Terms

Browse our comprehensive glossary covering marketing, events, entertainment, and more.

Chat with AMW Online
Click to start talking