01 / 11
The same screen, three ways of building the HTML
Last lesson we split the container round trip (the same whoever looks) from the data round trip (different from person to person). This time we go one level further into that first one.
Even for pages that look exactly the same, there are three answers to when and where the finished string of HTML gets built.
- Built in the browser (CSR) … the HTML that arrives is nearly empty. It gets put together once the JavaScript runs
- Built on the server (SSR) … on every request, the server builds finished HTML and returns it
- Built in advance (SSG) … built before release and handed out as a file
None of them is the right answer. The goal of this chapter is to be able to say what each one buys and what it gives up. The three things being fought over are a fast first paint, fresh data, and a light server.