Login

Create account

Server-Side Vs Client-Side
Istiak Bin Yousuf
Istiak Bin Yousuf

Posted on Aug 22, 2024

Server-Side Vs Client-Side

Server-Side Rendering (SSR)

What It Is: The server generates the full HTML for a webpage and sends it to the browser.
How It Works: When you request a webpage, the server processes the request, builds the HTML with data, and then sends the complete page to your browser.
Advantages:
    Faster initial load time because the HTML is ready to be displayed.
    Better for SEO (search engines can easily read the content).
Disadvantages:
    It can be slower for users with a slow server response.
    May require reloading the page for every interaction.

Client-Side Rendering (CSR)

What It Is: The browser generates the HTML using JavaScript after receiving a basic HTML page from the server.
How It Works: When you request a webpage, the server sends a minimal HTML page, and the browser loads JavaScript that builds the content dynamically.
Advantages:
    More interactive and responsive because JavaScript handles updates without reloading the page.
    Reduces server load as the server mainly sends static files.
Disadvantages:
    Initial load time can be slower because the browser needs to download and run JavaScript.
    SEO can be more challenging since search engines may have difficulty indexing JavaScript-generated content.

1 Reactions

1 Bookmarks

Read next

Istiak Bin Yousuf

Istiak Bin Yousuf

Aug 22, 2024

3 min read

Express.js Vs Nest.js
Istiak Bin Yousuf

Istiak Bin Yousuf

Aug 22, 2024

4 min read

What is MERN Stack?
Istiak Bin Yousuf

Istiak Bin Yousuf

Sep 10, 2024

1 min read

Password Generator