What is the difference between SSR, SSG (prerendering) and CSR, and how do you choose?

Angular performance and SSR · Experienced

Model answer

CSR renders everything in the browser: simplest to host, weaker for SEO and first load. SSR renders on the server for each request: fresh content, but needs a server and is slower per request. SSG, or prerendering, renders pages to HTML at build time: very fast and cheap to host, but content is only as fresh as the last build.

Choose per page: static prerendering for marketing and docs, SSR for frequently changing public pages, CSR for dashboards behind login. Angular lets you mix these per route in newer versions.

Learn this topic

Angular Tutorial: Beginner to Advanced .

Sign in to add your own answer.

More questions