Two teams build an online catalogue of handloom sarees. Team one ships a single-page app: the server sends a nearly empty HTML file and a bundle of JavaScript, and the browser fetches data and builds the page. Team two renders each product page on the server and sends finished HTML. Same data, same design. Which is better? My position is that the answer depends on who is looking at the page, and that the industry spent a decade pretending it did not.

What each one does, step by step

Client-side rendering (CSR). The browser requests the page and receives a small HTML shell with an empty container. It downloads the JavaScript bundle, parses and runs it, the code calls an API, waits for JSON, and only then builds the elements on screen. Until that chain completes, the visitor sees a blank page or a spinner.

Server-side rendering (SSR). The server receives the request, fetches the data itself (usually close to the database, over a fast internal network), generates complete HTML, and sends it. The browser can paint content as soon as the HTML arrives, before any JavaScript runs. Frameworks such as Next.js, Nuxt, Angular Universal and plain server-templated systems (Django, Rails, PHP, Spring MVC with templates) work this way.

A middle course, static site generation (SSG), renders the HTML once at build time and serves files from a CDN. Excellent for pages that change rarely.

Where the first load differs

The CSR path is serial: HTML, then script, then API, then paint. Each step waits on the previous one, and each pays a network round trip. On an office fibre line in Chennai you may never notice. On a mid-range Android phone on a patchy 4G connection in a smaller town, the script alone can take seconds to download and longer to parse and run, because phone CPUs are far slower than developer laptops. The SSR path puts real content on screen after one round trip, so it usually wins on perceived speed and on the Largest Contentful Paint metric.

SSR has a catch called hydration. The HTML is visible quickly, but buttons do not respond until the same JavaScript has downloaded and attached event handlers. A page can look ready and still ignore taps for a moment. Careless SSR can feel worse than honest CSR for exactly this reason. Newer approaches (streaming, partial or selective hydration, server components in React) shrink that gap by shipping less JavaScript.

Search engines and link previews

Google can execute JavaScript and index client-rendered pages, but it does so in a separate rendering step that can lag behind crawling, and it is more fragile than reading HTML that is already there. Other consumers are less capable. Link-preview bots on WhatsApp, LinkedIn and X generally read the raw HTML for title and image tags, so a CSR page often shares as a blank card. Many AI crawlers also do not run scripts. If a page exists to be found or shared, serve its content in the initial HTML. That is the single strongest argument for SSR, and for most public pages it settles the question.

What it costs to run

CSR is cheap to host: static files on a CDN, with the compute done by users’ own devices. SSR spends your CPU on every request, so a traffic spike hits your servers. You then need caching (full-page caching for anonymous visitors, short-lived caches with revalidation), and you must be careful that personalised output does not get cached and served to the wrong person. The risk of one user seeing another’s data is real, and it has caused production incidents in teams who added a cache without thinking about it.

SSR also complicates the code. The same components run in two places, a server with no window object and a browser. Code that touches browser-only features at import time crashes on the server. Mismatches between server HTML and client output cause hydration warnings and flicker.

Where CSR is the better choice

Behind a login. A dashboard, an admin console, an internal HR tool, a trading screen. Search engines never see it. Users load it once and then spend an hour clicking, so the bundle is cached and navigation after that is quick, without a server round trip for every view. Rich interactivity (drag and drop, live charts, a spreadsheet-like grid) is simpler when the browser owns the state. SSR here buys little and costs infrastructure.

My rule of thumb

Kind of pageLean towards
Marketing, blog, documentationStatic generation
Product or listing pages, public, frequently changingServer rendering with caching
Logged-in app, dashboardsClient rendering
Mixed (public shell, private widgets)Server-render the shell, fetch private data on the client

Back to the saree catalogue. Product pages exist to be discovered, shared on WhatsApp and opened on modest phones, so team two chose correctly. If the same company builds a seller dashboard for weavers to manage stock, team one’s approach is fine, and arguably better. Most real products need both, and modern frameworks let you choose per route. The mistake is choosing once, for the whole product, because a particular framework was fashionable that year.

One thing I would not argue about: measure on a real, slow device before deciding. Throttling in browser developer tools approximates it, and the result is usually humbling.

Figures and names in the examples are illustrative.

Leave a Reply

Trending