Server-Side Rendering vs Client-Side Rendering
With server rendering, the server builds the page and sends it ready to read. With client rendering, the browser gets code and builds the page itself. That makes the first view slower.
Server-Side Rendering (SSR)
The server builds the full page for each visit. It arrives ready to show.
Server-side rendering means the server builds the full page for each visit. It sends HTML that is ready to show. The user sees content at once, before any JavaScript runs. Search engines can read the page with ease too. The cost is more work on the server each time. Many new frameworks mix it with browser code, in a step called hydration.
Client-Side Rendering (CSR)
The browser builds the page with JavaScript. It starts once the code arrives.
Client-side rendering means the browser builds the page with JavaScript. The server sends a nearly empty HTML file plus the code. The code then runs in the browser, fetches data and draws the page. It keeps the server simple and makes later clicks fast. But the user sees a blank screen until the code has loaded and run.
In one line
- Server-Side Rendering (SSR)
- The server builds the full page for each visit. It arrives ready to show.
- Client-Side Rendering (CSR)
- The browser builds the page with JavaScript. It starts once the code arrives.