Naatan
Naatan

Reputation: 3464

How to reload CSS when using Less.js

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.com/cloudhead/less.js/issues/346

But to no avail.

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

Thanks

Upvotes: 7

Views: 5461

Answers (1)

Naatan
Naatan

Reputation: 3464

Found the answer to my question here:

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

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

Upvotes: 4

Related Questions