Page Rendering: Client Side vs. Server Side
• stackchief •
There's an ongoing debate as to whether web pages should be rendered on the client or the server. Advocates of the client side will tell you it reduces server payloads, minimizes requests, and improves user experience. Others disagree, pointing out the issues surrounding SEO and initial page load times seen through a heavy reliance on the client. While both parties bring truth to the table, there exist caveats with both strategies. Be sure to ask yourself the following questions before you decide how you render pages for your web app.
What level of user interaction will you have?
Some web apps, such as content publishing sites, are more geared towards presenting information to the user. While they may have millions of visitors every day, these users are primarily consuming content (reading blogs or other publications).
How important are initial load times?
Page load time is critical for retaining users and keeping bounce rates low. Research has shown that page abandonment jumps exponentially just after a few seconds. It is critical that your app loads fast for any new visitors or potential subscribers.
When it comes to fast page loads, server side rendering wins. While client side rendering can reduce the number of requests you're making to the back end, you are relying heavily on the browser to pull in that initial payload and generate all the assets/libraries needed. This issue may not be apparent at first, but as your app grows in complexity, the initial load time will take an increasing hit.
Whether or not to use client side rendering depends largely on what your app emphasizes. If you're trying to build out the next social network, it may be good to explore client rich libraries to minimize requests and provide a seamless user experience. If you're a content publisher and more concerned with users finding and consuming your content, then use server side rendering to minimize initial load times and stay crawler friendly.