SSG
Static Site Generation
Generated at
2026-09-17T11:13:24.121Z
How it works
- This page is a Server Component with dynamic = "force-static".
- Next.js renders the HTML once during `next build` and stores it.
- Every later request is served that same HTML. The timestamp does not move until you rebuild.
- Use SSG for pages that are the same for every visitor and rarely change, such as marketing copy.
How to test
- Run a production server: `npm run build && npm run start` in client/. Dev mode (`npm run dev`) re-renders on every request, so SSG will look like SSR.
- Open /ssg and copy the Generated at value.
- Refresh several times. The timestamp must stay identical.
- In another terminal run `curl -sI http://localhost:3000/ssg` and look for x-nextjs-cache: HIT (after the first request).
- Rebuild (`npm run build && npm run start`). The timestamp should change to the new build time, then stay frozen again.