Skip to content

Server side rendering

Course: CSR vs SSR vs SSG - chapter 2

When the rendering process (converting JS components to HTML) happens on the server, it’s called SSR.

  1. SEO Optimisations
  2. Gets rid of the waterfalling problem
  3. No white flash before you see content

Try creating a NextJS app and notice the HTML file you receive is populated

  • Create next app npx create-next-app
  • Build the project
npm run build
  • Start the NEXT Server
npm run start

Notice the initial HTML page is populated

  1. Expensive since every request needs to render on the server
  2. Harder to scale, you can’t cache to CDNs