Chapter 2: The network

Server and client rendering

Also called SSR, CSR, Hydration

Rendering means turning data into a page. Server rendering does it before sending, so the HTML arrives ready to read. Client rendering sends JavaScript that builds the page in the browser. Static rendering does it once, when the site is built.

Your agent will pick one or inherit one from the framework, and the choice decides what breaks: a blank screen, a page that looks ready and isn't, or data that's as old as the last build. Decide on purpose, page by page, and ask how to tell which you got.

Say it to your agent

“Render the product page on the server so the content is in the HTML. Prove it: curl the URL and show me the product name in the output. Keep add-to-basket as client code, and make it look disabled until it can really respond.”

The workshop

Name a word, or describe what you mean in everyday language.