CSR
Client-Side Rendering
Generated at
Waiting for the browser…
Client-only state (no server round-trip)
How it works
- This page is a Client Component ("use client"). The server sends a JS bundle and a shell, not the finished timestamp.
- useEffect runs only in the browser after hydration, then Date.now() is computed on the client.
- View Page Source will show “Waiting for the browser…” — the real time appears only after JavaScript runs.
- Use CSR for highly interactive UI (dashboards, widgets) where the first paint can wait for the browser.
How to test
- Open /csr. You should briefly see “Waiting for the browser…”, then a timestamp.
- Right-click → View Page Source (not Inspect). Search for “Waiting for the browser”. That string is in the HTML. The ISO timestamp is not.
- Open DevTools → Network, reload, and confirm a JS bundle loads before the timestamp appears.
- Click the button. The count updates instantly with no new document request — that is client state.
- Refresh: the timestamp changes (new client render) and the click count resets (state lives only in the browser).