Search⌘ K
AI Features

Client-side Rendering vs. Server-side Rendering

Explore the distinctions between client-side rendering and server-side rendering. Understand how these techniques affect content loading speed, SEO, and server load. This lesson helps you grasp their pros and cons to optimize web performance and better prepare for web development interviews.

Client-side rendering

A website that uses client-side rendering will have the server send a mostly empty HTML file to begin with. It will have links to CSS in the <head>. It will also have links to JavaScript in the <script> just before the closing </body> tag. The <body> will otherwise be empty. This is to stop JavaScript loading from blocking content loading. So, the content is loaded and the scripts are loaded next.

An alternative to this is to use async in the script tag, like so: ...