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?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
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.
Client-side:
Advantages:
Disadvantages:
Server-side:
Advantages:
Disadvantages:
My advise:
Never ever use client side in production. In development it may however be very useful to compile less client side.
Using ASP.NET MVC 4.0 Bundling you can use:
Everything will be handled very nicely. Caching, Transforming (server-side), bundling and ...