Skip to content

The basic principles and process of SSR (Server-Side Rendering)

Published at  at 04:27 PM

What is SSR

Server Side Rendering (SSR) refers to the process of rendering web pages on the server side. The main difference from traditional client-side rendering (CSR) is that in CSR mode, the server returns:

  <div id="app"></div>
  <script src="/"></script>

In SSR mode, the server returns

<div id="app" data-server-rendered="true">
  <div class="user-wraper">
    <p>Hello, Bowen!</p>
  <ul class="order-list">
    <li>Order ID:111</li>
    <li>Order ID:222</li>

Why Use SSR

The main advantages are:

SSR Sequence Diagram

Mount the virtual DOM to the real DOM

Share on: