本文介绍了运行LESS服务器端与客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行LESS框架客户端与服务器端有什么优点/缺点?如果你在客户端运行页面加载时间会受到影响吗?

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?

推荐答案

在服务器上,你需要更加小心使用缓存控制头并牺牲一点CPU功率。

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

在客户端,如果JS不可用,它会中断。

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

(对于您的生产系统),在构建时执行它,只提供静态CSS。这是有效和可靠的。

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

这篇关于运行LESS服务器端与客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 05:27
查看更多