PerformanceArchitecture
SSGFeb 23, 2026, 05:43:40 PM

Static Site Generation

This page was generated during the build process. When you visit it, you are receiving a pre-built HTML file from the CDN, making it incredibly fast. This is the foundation of the Jamstack approach.

Rendering EnvServer Runtime

Strategy Details

Generated at build time. For static content that doesn't change often, like landing pages or blog posts.

Hydration Logic

Pre-rendered HTML is sent to the client, then React 'hydrates' it to enable full interactivity.

Static Generation Pipeline

Order of operations

Build Time

Next.js fetches data and generates HTML during "npm run build".

Static Asset

The page is saved as a physical .html file on the server.

Edge Deployment

Static files are pushed to the Global CDN Edge.

Instant Delivery

Users receive the pre-built file in milliseconds (0ms server logic).

Implementation Blueprint
app/page.tsx
// Default behavior (Static)
export default async function Page() {
  // Fetched ONCE during build-time
  const data = await fetch('https://api.com/data');
  
  return (
    <main>
      <h1>Static Content</h1>
      {data.map(item => <Card key={item.id} {...item} />)}
    </main>
  );
}

SSG is the gold standard for performance. Since the server does zero work at request time, the Time to First Byte (TTFB) is near-zero. Best for marketing pages and public blogs.

Essence Mascara Lash Princess
beauty
2.56 (99 reviews)

Essence Mascara Lash Princess

The Essence Mascara Lash Princess is a popular mascara known for its volumizing and lengthening effects. Achieve dramatic lashes with this long-lasting and cruelty-free formula.

$9.99
Eyeshadow Palette with Mirror
beauty
2.86 (34 reviews)

Eyeshadow Palette with Mirror

The Eyeshadow Palette with Mirror offers a versatile range of eyeshadow shades for creating stunning eye looks. With a built-in mirror, it's convenient for on-the-go makeup application.

$19.99
Powder Canister
beauty
4.64 (89 reviews)

Powder Canister

The Powder Canister is a finely milled setting powder designed to set makeup and control shine. With a lightweight and translucent formula, it provides a smooth and matte finish.

$14.99
Red Lipstick
beauty
4.36 (91 reviews)

Red Lipstick

The Red Lipstick is a classic and bold choice for adding a pop of color to your lips. With a creamy and pigmented formula, it provides a vibrant and long-lasting finish.

$12.99
Red Nail Polish
beauty
4.32 (79 reviews)

Red Nail Polish

The Red Nail Polish offers a rich and glossy red hue for vibrant and polished nails. With a quick-drying formula, it provides a salon-quality finish at home.

$8.99
Calvin Klein CK One
fragrances
4.37 (29 reviews)

Calvin Klein CK One

CK One by Calvin Klein is a classic unisex fragrance, known for its fresh and clean scent. It's a versatile fragrance suitable for everyday wear.

$49.99
Chanel Coco Noir Eau De
fragrances
4.26 (58 reviews)

Chanel Coco Noir Eau De

Coco Noir by Chanel is an elegant and mysterious fragrance, featuring notes of grapefruit, rose, and sandalwood. Perfect for evening occasions.

$129.99
Dior J'adore
fragrances
3.8 (98 reviews)

Dior J'adore

J'adore by Dior is a luxurious and floral fragrance, known for its blend of ylang-ylang, rose, and jasmine. It embodies femininity and sophistication.

$89.99

1Normal Pages

Standard pages like /about or /contact are automatically generated as static HTML files during the build process if they don't use dynamic functions like cookies() or headers().

2Dynamic ID Pages

For dynamic routes like /blog/[id], use generateStaticParams. This tells Next.js which specific IDs to pre-render at build time, ensuring those pages load instantly like static ones.

The generateStaticParams Pattern (Dynamic SSG)

// src/app/blog/[id]/page.tsx
export async function generateStaticParams() {
  const posts = await fetch('https://api.com/posts').then(res => res.json());
 
  // Next.js will build ALL these pages at Build Time
  return posts.map((post) => ({
    id: post.id.toString(),
  }));
}
Production Build Artifact
next build -> serverless architecture ready