CodeZettaInterview Hub

Next.js · SSR · Junior · Scenario

How do you SSR with authentication cookies?

Short Interview Answer

Read cookies on the server, fetch user-scoped data, and avoid caching personalized responses as public.

Detailed Explanation

Use `cookies()` which marks the route dynamic. Set Cache-Control carefully. Never store session HTML in a shared CDN cache without Vary/private.

Did you know this answer?