230524 SSR vs CSR

William Parker·2023년 5월 24일
0

What is browser rendering?

First, browser rendering refers to the task of displaying the content requested by the browser from the server on the browser view. In other words, the browser receives HTML, CSS, and JavaScript documents from the server, and the browser engine interprets each document and draws the browser screen. For example, if you access the Chrome browser and enter www.devepeople.kr in the address bar, the browser receives information about the DevPeople website from the DevPeople server and draws the DevPeople homepage on the browser screen. And this browser rendering is largely divided into ‘client-side rendering’ and ‘server-side rendering’.

What is Client Side Rendering?

Client-side rendering is how the client, the browser, handles the rendering. In other words, through the data received from the server, the client browser becomes the subject of drawing the view.

Pros : You can implement fast interactions similar to native apps. By leaving the rendering of the view to the browser, it reduces server traffic and provides faster interaction to users. No refresh occurs, giving users a similar experience to native apps.

Cons : First page loading is rather slow compared to server-side rendering. Loading speed is slower than server-side rendering because the first request to the server receives all the document files for the entire page. Search engine optimization (SEO) needs additional supplementary work. Portal site search engine crawlers may not properly collect data about your website. In the case of Google's search engine, it is crawled because it has a built-in JavaScript engine. (e.g. create a sitemap document)

What is Server Side Rendering?

Server-side rendering is a method in which the client (browser) requests data from the server each time and the server processes it. Whenever a request comes in from the client, the server creates and provides a new view. In other words, the server becomes the subject of drawing the screen (View).

Pros : Faster first page load compared to client-side rendering. Initial loading is faster than client-side rendering because only documents corresponding to that first page are passed to the browser and the browser renders them. Search engine optimization (SEO) is possible.

Cons : Somewhat slow when moving pages after initial loading. The speed is rather slow because the client requests necessary data from the server every time the page is moved and the server responds.

profile
Developer who does not give up and keeps on going.

0개의 댓글