Lädt...

🔧 Exploring Web Rendering Strategies: A Deep Dive into CSR, SSR, SSG and ISG


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Introduction

Every day we interact with a lot of web applications. They all seem the same web applications to us but the way they are rendered on the screen is pretty different. It can be SSR or maybe CSR or SSG or ISG anything. In this blog, I will explain these web rendering strategies and how to choose one.

There are mainly 4 types of web rendering strategies:

  1. Client-Side Rendering (CSR)
  2. Server-Side Rendering (SSR)
  3. Static Site Generation (SSG)
  4. Incremental Static Generation (ISG)

let's deep dive into them one by one.

Client-Side Rendering (CSR):

In Client-Side Rendering, a request has been made to the server at first and then a minimal HTML file comes with the JavaScript files. Now with the help of JavaScript, the content of the website is loaded. Even the routing also handled by JavaScript and no HTML is fetched from the Server.

Usage

This technique is ideal for apps which have a lot of interactions. But from an SEO perspective, this is not a great choice. Also, for the first time, it takes a little time as all the page data is loaded at once.

Example

React, Vue and Angular use Client-Side Rendering.

Server-Side Rendering (SSR):

In Server-Side Rendering, the server generates a full HTML page on the server in response to the user's request and then sends that to the client.

Usage

This technique is ideal when you need faster initial loads and better SEO advantages. But as for each request, the server generates the content dynamically, which leads to increased load and response times.

Example

NextJS, NuxtJS, and Angular Universal use Server-Side Rendering.

Static Site Generation (SSG):

In Static Site Generation, all the pages are generated at build time. Each page is pre-rendered into static HTML, and when the user requests a page, the server sends the HTML file based on the request.

Usage

Since the pages are pre-built, the performance of the site is pretty fast. Also, it reduces the load to the backend.

Example

Gatsby uses Static Site Generation.

Incremental Static Generation (ISG):

In Incremental Static Generation, pages are built statically the same as in SSG, but on a per-page basis as they are requested. If a page is not pre-built at build time, it is built when first requested and later also, served as a static site.

Usage

Since the pages are built only when requested the build time is much less and also as they are served as static pages from the next time they are pretty fast later. But it is pretty complex to implement compared to SSG or SSR. Also, first-time visitors can experience a delay as the page is built.

Example

NextJS uses Incremental Static Generation.

Summary

Each of the rendering strategies holds different significance when in use. It's not like one is better than the other. It always depends on your use case. If you like this blog give it a like and write your feedback in the comment below. Also, if want to learn more about Frontend Engineering and Software Engineering you can follow me on LinkedIn and X.

...

🔧 Exploring Web Rendering Strategies: A Deep Dive into CSR, SSR, SSG and ISG


📈 132.3 Punkte
🔧 Programmierung

🔧 Exploring Web Rendering Techniques in Next.js 15: A Deep Dive into SSG, SSR, CSR, and ISR


📈 102.27 Punkte
🔧 Programmierung

🔧 Understanding SSR, CSR, and SSG: A Guide to Web Rendering Strategies


📈 81.21 Punkte
🔧 Programmierung

🔧 A Deep dive into CSR, SSR, SSG and ISR


📈 78.12 Punkte
🔧 Programmierung

🔧 CSR vs SSR vs SSG vs ISR: A Deep Dive for Modern Web Development


📈 74.86 Punkte
🔧 Programmierung

🔧 How to understand the concepts of Next.js such as CSR , SSR, SSG, ISR, RSC, SPA, and Streaming SSR?


📈 72.27 Punkte
🔧 Programmierung

🔧 The Ultimate Guide to Web Rendering: Improving Performance with CSR, SSR, SSG, and ISR


📈 71.98 Punkte
🔧 Programmierung

🔧 Server-Side Rendering (SSR) vs. Client-Side Rendering (CSR): The Fascinating World of Page Rendering


📈 71.77 Punkte
🔧 Programmierung

🔧 🚀 Rendering Rumble: SSR vs CSR vs SSG - The Ultimate Frontend Showdown! 💥


📈 67.1 Punkte
🔧 Programmierung

🔧 Server-Side Rendering (SSR) vs. Client-Side Rendering (CSR) in Web Applications: A Complete Guide


📈 63.18 Punkte
🔧 Programmierung

🔧 Client-Side Rendering (CSR) vs. Server-Side Rendering (SSR), Hydration and Selective Hydration


📈 61.02 Punkte
🔧 Programmierung

🔧 What do SSR, CSR, ISR and SSG mean? A complete guide for web developers


📈 59.88 Punkte
🔧 Programmierung

🔧 CSR, SSR, pre-rendering: Which rendering technique to choose?


📈 59.66 Punkte
🔧 Programmierung

🔧 Client Side Rendering (CSR) vs Server Side Rendering (SSR): Simplified Story


📈 59.66 Punkte
🔧 Programmierung

🔧 Client-Side Rendering (CSR) Vs Server-Side Rendering (SSR)


📈 59.66 Punkte
🔧 Programmierung

🔧 Understanding Server-Side Rendering (SSR) vs. Client-Side Rendering (CSR)


📈 59.66 Punkte
🔧 Programmierung

🔧 Web Dev Buzzwords: CSR, SSR, SSG!


📈 58.52 Punkte
🔧 Programmierung

🔧 The difference of writing CSR, SSR and SSG in Next.js App Router and Page Router.


📈 57.72 Punkte
🔧 Programmierung

🔧 Understanding CSR, SSR, SSG, and ISR in Next.js: A Beginner-Friendly Guide


📈 56.36 Punkte
🔧 Programmierung

🔧 Desvendando SSR, CSR, SSG e RSC: Entenda de vez essas siglas do React e Next.js


📈 55 Punkte
🔧 Programmierung

🔧 SSR vs SSG vs ISR vs CSR – What’s the Difference?


📈 55 Punkte
🔧 Programmierung

🔧 SSR vs. SSG vs. CSR trong nextjs là gì the


📈 55 Punkte
🔧 Programmierung

🔧 CSR vs SSR vs SSG


📈 55 Punkte
🔧 Programmierung

🔧 Escaping the Uncanny Valley: Understanding CSR, SSR, Hydration, and Modern Web Rendering


📈 52.44 Punkte
🔧 Programmierung

🔧 Understanding the difference between Static Site Generation (SSG) and Server Side Rendering (SSR)


📈 48.92 Punkte
🔧 Programmierung

🔧 What is Server Side Rendering (SSR) and Static Site Generation (SSG)?


📈 48.92 Punkte
🔧 Programmierung

🔧 Server Side Rendering in JavaScript – SSR vs CSR Explained


📈 47.56 Punkte
🔧 Programmierung

🔧 Episode 24/27: SSR Hybrid Rendering & Full SSR Guide


📈 43.94 Punkte
🔧 Programmierung