最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to reload CSS when using Less.js - Stack Overflow

programmeradmin0浏览0评论

I can see in the source that it basically reloads css automatically if you are on localhost, and I can see in the firebug panel that it's requesting the .less file(s) every second.. but when I change something in the files it's not updated on the page unless I do a full refresh.

I also tried using less.refresh() as described here:

.js/issues/346

But to no avail.

So, how can I reload the .less files without reloading the page?

Thanks

I can see in the source that it basically reloads css automatically if you are on localhost, and I can see in the firebug panel that it's requesting the .less file(s) every second.. but when I change something in the files it's not updated on the page unless I do a full refresh.

I also tried using less.refresh() as described here:

https://github./cloudhead/less.js/issues/346

But to no avail.

So, how can I reload the .less files without reloading the page?

Thanks

Share Improve this question asked Oct 13, 2011 at 16:48 NaatanNaatan 3,4844 gold badges34 silver badges52 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

Found the answer to my question here:

https://github./cloudhead/less.js/issues/168

Basically had to add a header to prevent caching .less files.

发布评论

评论列表(0)

  1. 暂无评论