FM-Wiki

Server-side Rendering

by: Ally | Published: 2021-08-18

When a browser sends a request to a server for a web page, the server builds the web page (in our case, we are using PHP) and gives the client a prepared web page.

Advantages:

By far the best rendering solution for SEO. Search engines can actually pick through all of the site content.

Disadvantages

When the user navigates to a new page, the server has to prepare the entire new page, even if this page has much of the same content as before, like a navigation menu. So there are more frequent server requests and slower page rendering.

Client-side Rendering

The browser is what grabs the content from the server and builds the web page, using Javascript.

Advantages

If the user navigates to a new page, the browser will only load what is new. So if you move to a new page, the navigation menu will not be reloaded because it was on the previous page.

Disadvantages

Typically not SEO friendly, since search engines do not have anything to crawl while the browser is building the page.

More about client and server-side rendering

Dynamic Rendering

Dynamic rendering is essentially a way to use client rendering, but in an SEO-friendly way. Dynamic rendering is done by building static web pages that bots can crawl for search engine requests, but also giving user-generated requests pages rendered on the client.

More info on dynamic rendering

Single Page Applications

A single page application (SPA) refers to a site that simply updates the current page with new content, and does not pull an entire new page from the server. This is done with modern javascript frameworks that use client side rendering.

Back to All Notes