Because you are on .NET, I recommend you check out the DotLess project. It's open source and very active. They have an HTTP Handler that plugs into IIS, it grabs any request for a .less file and returns a valid CSS file. I don't know what amount of caching they use, but you can probably rely on the browser to cache a good amount of it..
The DotLess project also has an executable that will compile when you want (like during a project build), or on demand prgrammatically.
The pros and cons for which way you do it really depends on your project. I think the best workflow may be to use LESS.js for development because you don't need external dependencies besides the javascript file, and all the changes are live right away. Then as the project is promoted through various testing and production environments, you can install the web server filter or precompile it. Again, it depends on how you want to solve it for your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With