DEV Community

akpvt
akpvt

Posted on

Server Side Rendering - SSR (Javascript)

Based on the search results, here's a summary of what server-side rendering (SSR) is:

Server-side rendering is a web development technique where the server generates the full HTML content of a web page before sending it to the client's browser.

Traditional server-side technologies (like PHP, Python with Django/Flask) also render pages on the server, the term "SSR" is typically used in the context of JavaScript frameworks that can render on both client and server [3]. SSR can improve Core Web Vitals scores, particularly metrics like First Contentful Paint (FCP) and Largest Contentful Paint (LCP) [1][4].

*Key points about SSR include:
*

  1. The server executes JavaScript code and renders the page content, including fetching data and generating HTML, before sending it to the browser [1][2].

  2. It's different from client-side rendering (CSR), where the browser generates the HTML content after receiving raw data from the server [2].

  3. SSR can lead to faster initial page load times because the browser receives a fully rendered page, rather than waiting for JavaScript to execute and generate content [1][2].

  4. It improves SEO because search engine crawlers can more easily index the fully rendered content [1][2].

  5. SSR is beneficial for content-heavy websites, sites prioritizing SEO, and when catering to users with slow internet connections [1][2].

  6. It can enhance performance by reducing the workload on the client's browser, especially for JavaScript-heavy single-page applications [3][4].

  7. SSR is often used with modern JavaScript frameworks like React, Angular, and Vue.js to mitigate performance issues associated with client-side rendering [2].

In essence, server-side rendering aims to provide a faster initial page load, better SEO, and improved performance, especially for complex web applications.

Citations:
[1] https://prismic.io/blog/what-is-ssr
[2] https://cloudinary.com/guides/automatic-image-cropping/server-side-rendering-benefits-use-cases-and-best-practices
[3] https://www.reddit.com/r/Frontend/comments/vjok9v/what_is_server_side_rendering/
[4] https://www.debugbear.com/blog/server-side-rendering
[5] https://www.sanity.io/glossary/server-side-rendering
[6] https://www.educative.io/answers/what-is-server-side-rendering
[7] https://nextjs.org/docs/pages/building-your-application/rendering/server-side-rendering
[8] https://rubyroidlabs.com/blog/2024/06/why-you-should-use-reactjs-for-your-development/

Top comments (0)