Client-Side Rendering and Server-Side Rendering
- Internet connection speed
- The distance of the user from the server
- The amount of user tying to open that site at a time
The response content from the server can be loaded in the browser(Client-Side Rendering) or on the server(Server-Side Rendering).
What is Client-Side Rendering?
Advantages of Client-Side Rendering?
- Lower server load since the browser does most of the rendering
- Quick navigation. The pages on the website don't have to be re-rendered when navigated to
Disadvantages of Client-Side Rendering?
- Initial load may require more time
- Most of the times, this approach depends on external libraries/frameworks
- SEO(Search Engine Optimization) may be low if not implemented correctly
What is Server-Side Rendering?
This was the type of rendering used when the web came about. This involves the browser making a request to the server, the server then generates the HTML as the response with content. Unlike Client-Side Rendering(CSR), the page is visible but not interactive immediately.
Advantages of Server-Side Rendering?
- SEO friendly
- The user gets to see the content fast compared to CSR
- The browser has less load
- A great option for static sites
Disadvantages of Server-Side Rendering?
- Server is busier
- Navigating to pages on the website restarts the rendering process.
Frameworks such as React, Angular, Vue and many other helps developers in achieving both types of rendering. None is better than the other. It all depends on what the developer is trying to achieve and choosing the best option in achieving it.
Learn Something New Everyday,
Connect With The Best Developers!