Server-side rendering explained: SSR, SSG, ISR and CSR in plain terms
Rendering strategies decide where and when your HTML is built. The acronyms are confusing, but the ideas are simple.
CSR (Client-Side Rendering) The server sends a mostly empty HTML page plus JavaScript, and the browser builds the page. Good for highly interactive apps behind logins. Slower first paint and weaker for SEO if crawlers do not run your JavaScript well.
SSR (Server-Side Rendering) The server builds full HTML for each request. Fast first content and good SEO, but each request costs server work, and the page still needs to "hydrate" to become interactive.
SSG (Static Site Generation) Pages are built once at deploy time and served as static files from a CDN. Extremely fast and cheap, ideal for blogs, docs and marketing pages, but content changes require a rebuild.
ISR (Incremental Static Regeneration) and similar Static pages that are regenerated in the background after a set time or on demand. A middle ground between SSG and SSR.
Islands and partial hydration Mostly static HTML with small interactive components that hydrate independently, popularized by frameworks like Astro.
Most modern frameworks let you mix strategies per page.
Which rendering strategy do you default to? Have hydration costs ever pushed you toward islands or less JavaScript?
Comments · 3
For design-heavy sites, SSG can keep things fast, but dynamic features need care. First paint speed is a UX thing as much as a technical one.
Choosing a rendering strategy is a trade-off between complexity and speed. Most small teams should pick the simplest one that works and move later.
Is ISR mostly a middle ground, or does it have drawbacks? I'm still unsure when I'd choose it.