Client side rendering Vs. Server side rendering

Asked By 90 points N/A Posted on -
qa-featured

Client side rendering as opposed to server side rendering improves page load time. Is the statement correct? What is the difference between the client side rendering and server side rendering? When do you think client side rendering would make for better and faster performance of web pages? What is Google Closure in this context and what is it used for?

SHARE
Answered By 590495 points N/A #188945

Client side rendering Vs. Server side rendering

qa-featured

With client-side rendering, your first request loads the CSS, page layout, and the JavaScript. This is pretty common when requesting a page except that several or maybe all of the content is not included. The JavaScript will then make another request, receives a response like for example in JSON, and then generates the correct HTML.

With server-side rendering, your initial request loads the page, the layout, the CSS, the JavaScript, and finally the content. If you’ll be comparing the flow of the 2 methods or approaches, it would be obvious that client-side rendering is going to be slower. It needs downloading more JavaScript which means parsing more JavaScript.

Client-side rendering needs a second HTTP request to load the content and again requires more JavaScript to produce the template. Even if the first JavaScript gets cached, it still requires parsing and the second request will not happen until the document is loaded.

Related Questions