SSR

Server-Side Rendering

Generated at

2026-09-17T20:39:55.577Z

How it works

  1. This page is a Server Component with dynamic = "force-dynamic".
  2. await connection() tells Next.js this route depends on the incoming request, so it cannot be prerendered.
  3. The server runs this function on every request and sends fresh HTML.
  4. Use SSR when the HTML must be up to date for this request (auth, live prices, personalized data).

How to test

  1. Production mode is still best: `npm run build && npm run start` in client/.
  2. Open /ssr and copy the Generated at value.
  3. Refresh. The timestamp must change every time.
  4. Run `curl -sI http://localhost:3000/ssr`. Expect Cache-Control with no-store (or similar), not a long s-maxage.
  5. View Page Source. The timestamp is already in the HTML — the server rendered it before the browser ran JavaScript.