5

I was wondering if anyone knew if the JS interpreter for LESS css causes any noticeable delays in page loading. I would prefer to use the JS parser simply because it's easier to use, since I won't have to run the compiler after every edit and easier to manage the source code as SCM tools won't be tracking both the .less and .css files

2
  • 2
    You don't have to manually compile after each edit. Just let your less files be watched for changes. I use SASS, and all I do is run sass --watch sass:css in the command line. Also, doing it with JS supposedly makes the page quite slow on mobile environments... Commented May 3, 2012 at 1:41
  • 1
    You can also have your .htaccess file direct referenced .less files towards the compiler and return the compiled CSS: stackoverflow.com/a/12274629/1455709 Commented Dec 15, 2013 at 9:36

2 Answers 2

6

Its not slow on fast computers/browsers. However depending on your target audience I wouldn't use it.

I would rather setup lessc to watch a file/directory and generate css files on save. And then commit both the less and the css files to your SCM (that is infact what I do).

Also doing it this way allows for continuous integration builds.

http://en.wikipedia.org/wiki/Continuous_integration

Sign up to request clarification or add additional context in comments.

Comments

1

I would also suggest parse LESS styles into normal CSS. There're still people who have JS turned OFF or who use some JS-blocking addons. In such case, you'll get unstyled page, which is not the best way to impress your audience.

If you're on Mac - try Less.App If you're on Windows - try WinLess If you're on Linux - try SimpleLess

All applications have an Option to "watch directory" (with LESS styles) and compile automatically if changed. Less.App & WinLess have a lot of other options like: compile minified, start with system, start minimized, etc...

1 Comment

People who disable JS can... go away. I mean, why do that. JS is part of the web. Its like disabling all application written in C.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.