1

I have this problem with a LESS project. It's first time that I try this new language...

I'm using less.js library to parse .less file in real time.

I created many .less files with a main.less that @import others. Today I experienced some strange behaviour:

  • Some edits on a secondary .less file seems to be completely ignored.
  • On another PC the same website (I edit my files directly on an ftp folder) has previous modifications, so they were correct!
  • Coming back to original PC, again, modifications are ignored.

I thought about cache problems but even empting cache, problem remains....

Here on SO I found a possible solution concerning watch() mode... I tried adding #!watch at the end of the URL as suggested in official documentation and it seems running correctly. (see lesscss import and watch)

So, can you explain me why there is this problem (apparently related only to secondary files, not on the main.less) and what is the exact role of watch() mode?

Thank you, Luca

Community
  • 1
  • 1
Luca Detomi
  • 5,564
  • 7
  • 52
  • 77

1 Answers1

1

Cached files are not stored in the browser cache but in browser's local Storage. Empty your cache did not clean these files.

Before running less.js you will have the opportunity to setup a global javascript object with settings. The most important setting in this case seems env set it to development this will prevent caching of your LESS files. Running .watch will do the same. See also: using Sass/Less and Live Css editing

Community
  • 1
  • 1
Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224