Server Side Rendering

Server Side Rendering (SSR) took a backseat when dynamic JavaScript frontends built in AngularJS went mainstream. Node.js brought JavaScript under the realm of backend development, giving rise to isomorphic coding. AngularJS(v1.X) did not support server side rendering. When React and Angular (v2.0+) came along with first class support for server side rendering and developers realized its full potential, the dynamics of isomorphic JavaScript coding began to fall away from web browsers to Node servers. JavaScript developers realized server side scripting results in better performance and businesses looking to boost their customer engagement followed the suite.

Before digging into how server side rendering improves customer experience to boost engagement and why use should implement it, let’s see how server side rendering and client-side rendering work in real world scenarios. I will introduce the concept of client-side rendering which happens in users’ web browsers. Then I will move to explain the concept of server side rendering and how it is better for business as well as users.

Let’s see what happens when a user hit URL in the web browser

Every web application has two parts: markups and logic. Browsers are champions at rendering markups. In a LAMP stack web app, the logic is in PHP, which the browser can’t render readily and have to rely on an Apache server to render. However, when we talk about isomorphic JavaScript coding in MEAN stack and MERN stack, the browser can handily render logic in addition to markup and application can go about without the need of server side rendering. In case of pure JavaScript applications, SSR is more of a luxury than need.

How server side rendering compares to client-side rendering when a person requests the site:

Client-side Rendering Server Side Rendering
 Server pull HTML files with links to JavaScript  Server-sends “ready to render” HTML files
 Browser downloads HTML  Browser displays a non-interactive page
 Browser downloads JavaScript  Browser downloads JavaScript
 Browser executes framework  Browser executes framework
 Page loads completely  Page become interactive

If you look at the table above, the principal difference between the two is this that in SSR, the requesting person gets a glimpse of the page without any delay. While in CSR, the browser has to download JavaScript and html and execute framework before it could display the page. Therefore, the visitor gets a better user experience with server side scripting.

Benefits of Server Side Rendering

  • Server side rendering boost user engagement

Server side rendering has been around as long as web development. In modern JavaScript frameworks, it solves newer, modern problems that we did not realize we had. Any shift in technology brings fresh challenges and the shift to client-side rendering with AngularJS wasn’t any different. SSR struck no full-stack JavaScript developer although a few developers moving from LAMP technologies felt homesick without SSR. Most developers took CSR in AngularJS as the future of web development because nobody wanted to rerun into the hassles where the entire web page reloads every time something is changed in the View.

Server-side rendering boost user engagement

In fact, when Angular and React reintroduced server side scripting, developers criticized them for being overzealous. Soon dynamic front-ends, interactive content, and smooth mobile app-like user experiences became the standard, but they introduced unnecessary complexities, causing overfed client-side executions with empty loading screens and further performance bottlenecks. That wait time to load a CSR page to SSR page may be milliseconds on a decent internet connect, but it is noticeable enough to look for a less-limiting solution.

“A client running a news portal was experiencing huge bounce rate on his website. This was taking a toll on his Google AdSense revenue. The website was developed in AngularJS. Because of client-side rendering the browser was loading an empty page, which was raising false alarm that the website is not working, making visitors leave the website the very moment.

AngularJS does not support server-side rendering. We upgraded the underlying technology to React and implemented server-side rendering in order to do away with the “empty page” problem. The redesigned website in React brought the bounce rate under the safe limits and inspired client to bring SSR in all his applications.”

  • Better Performance for Page Visitors

Better Perofrmance & Growth

Not every device is same in terms of hardware capabilities or  has latest software. A page rendering on the client side relies too much on device’s hardware capability while rendering. A sub-capable hardware may fail to render the entire page in optimal time, thus, hampering user experience. The bounce rate of a page is directly proportional to its load time. Higher bounce is one of search engine ranking factors and may make Google slightly less prefer your website owing to extended load time. As a result, organic traffic to your website will fall, which will ultimately affect engagement on your website.

Since in server side rendering JavaScript is rendered server side, your users’ devices have little relevance to the load time of your page. Since most servers are capable enough; you will deliver a consistent load time to all the people visiting your website, boosting engagement on your website owing to less bounce rate and a healthy organic traffic.

  • Faster Loading of Page

When I drew comparison between CSR and SSR; I mentioned in SSR, the server sends “ready to render” HTML files to instantly load your website on the browser. In CSR, the browser has to download HTML and JavaScript files and execute the framework before it could display the page. In the meanwhile, the user has to deal with a blank page, which is a bad indicator for user experience.

Although the final page will take the same amount of time to load and user only gets a glimpse of the page initially, server side rendering has the psychological edge from a user’s point of view. A semi-loaded page will look more compelling than a blank page to users.

  • Search Engine Optimization

JavaScript front-ends are incomprehensible to Search engines crawlers. The crawler will return a blank page on encountering such a page on its journey to crawl new pages. Google, of course, will not index a page, which is blank to its crawler.

SEO of React Apps

Lack of search engine optimization is a huge drawback of client side rendering. server side rendering of JavaScript returns a pre-rendered HTML page for ready-display to the browser. The crawlers can crawl HTML as would any other web application. For businesses invested into digital marketing and SEO, server side rendering makes a lot more sense than client-side rendering.

Server Side Rendering with TOPS Infosolutions

In fall 2015, our React developers were attempting to rework an application originally built in AngularJS. We invested many hours of efforts to heighten the performance but the client insisted that the application was doing more or less the same in AngularJS. React was still a newer technology and we were quite skeptical about how server side rendering will work out. A few migrations and some changes in business logic and we were ready for the demo. The application out performed the client expectations. He insisted on going SSR way for all his future application.

Server Side Rendering is a luxury you can deliver in the form of a refined experience to your users. After all, the cut-throat competition doesn’t allow for anything that is any short of best.

Contact TOPS for react development

FAQs

  • Can server side rendering help boost user engagement?
    Server side rendering or SSR can help enhance user engagement by doing away with empty page problems that may occur in client side rendering or CSR. As a result, this can help bring down the website’s bounce rate.
  • Does SSR improve page loading speed?
    As compared to CSR, server side rendering creates a semi-loaded page instead of a blank page in the CSR, which helps to enhance the user experience.
  • Does SSR provide better SEO possibilities than CSR?
    Lack of search engine optimization is a major drawback of client side rendering. This is why for businesses invested in search engine optimization and digital marketing, server side rendering makes more sense than client-side rendering.
  • Is SSR better than CSR?
    The experienced experts and developers at TOPS Infosolutions know that SSR helps to boost user experience and is a better option to keep them engaged. It also offers consistent SEO performance, which is why SSR seems to be a better choice as compared to CSR.

Tags

Quick Inquiry

Quick Inquiry