Javascript
React
Ssr Vs Csr

Server-side rendering vs Client-side rendering

Server-side rendering

  • render components on the server and sending generated html to client
  • data can be fetched and rendered on the server, providing a prepopulated state to the client
  • provides faster initial page load and better SEO because html content is available to search engine crawlers
  • content-driven websites / websites that require initial content to be available quickly for seo

Client-side rendering

  • html page is empty initially, javascript bundle is responsible for rendering and populating content
  • data fetching and rendering performed dynamically as user interacts with app
  • provides a more interactive ux but might have slower initial page load times
  • SPA and dynamic content heavy apps