SSR vs CSR - alexanderteplov/computer-science GitHub Wiki

SSR vs CSR

CSR

Pros

  • Fast render after initial load
  • Faster navigation
  • Lower server load
  • Remarkable for web apps

Cons

  • Slower initial load (blocking resources: CSS, layout, js)
  • Unpredictable performance – you never know if your user will open and ‘compile’ your website on a mobile device with a very slow internet connection or not updated browser
  • Client-side routing solutions can delay web crawling
  • SEO – if you didn't implement correctly
  • Some or all content is not included during the first loading

SSR

Pros

  • SEO friendly – SSR guarantees your pages are easily indexable by search engines
  • Better performance for the user – User will see the content faster
  • Social Media Optimization: When people try to post your link on Facebook, Twitter, etc. then a nice preview will show up with the page title, description, and image.
  • Shared code with backend node
  • User-machine is less busy

Cons

  • TTFB (Time to first byte) is slower; your server has to spend some time preparing HTML for your page instead of sending an almost empty HTML doc with a link to javascript
  • The server will be busier, can execute fewer requests per second
  • HTML doc will be bigger
  • The page is viewable sooner, but it’s not interactive and in the beginning, a user has to wait until react will be done executing
  • Full page reload after routes change

Links

⚠️ **GitHub.com Fallback** ⚠️