Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running LESS server-side vs. client-side

What are the advantages / disadvantages to running the LESS framework client-side vs. server-side? Does page load time take a hit if you run it client-side?

like image 864
Jamie Forrest Avatar asked Nov 03 '11 10:11

Jamie Forrest


People also ask

Which is faster server-side or client-side?

Between the two options, server-side rendering is better for SEO than client-side rendering. This is because server-side rendering can speed up page load times, which not only improves the user experience, but can help your site rank better in Google search results.

Why is server-side rendering faster?

Server-side rendering allows developers to pre-populate a web page with custom user data directly on the server. It is generally faster to make all the requests within a server than making extra browser-to-server round-trips for them. This is what developers used to do before client-side rendering.

What is difference between server-side and client-side?

Client-side means that the processing takes place on the user's computer. It requires browsers to run the scripts on the client machine without involving any processing on the server. Server-side means that the processing takes place on a web server.

Is client-side rendering slow?

Since the browser needs to download and run the whole application code before the content appears on the screen, the first page load is usually slow with client-side rendering (server-side rendering splits this process between the client and server).


1 Answers

On the server, you have to take more care with your cache control headers and you sacrifice a bit of CPU power.

On the client, it breaks if JS isn't available.

(For your production systems,) do it at build time and just serve up static CSS. That's efficient and reliable.

like image 129
Quentin Avatar answered Sep 16 '22 22:09

Quentin