views:

48

answers:

2

From your experience, what's the most flexible minimizer/compressor (JS+CSS) for ASP.NET MVC you've dealt with?

So far

By flexible I mean

  • Choose what should be compressed, minified, and combined
  • Add exceptions. E.g. if debug don't compress XYZ.JS or don't minify ABC.CSS
  • Caching
  • In the end, it should help offer the best YSLOW score.

If you know of any other assemblies out there, please list them also.

A: 

I personally find the C# port of YUI Compressor to be the best of the best when it comes to CSS and JavaScript minification. In the end, though, you're going to have to do the leg work to get a perfect YSLOW score. There's no library that you can just drag and drop and it will magically make your website fast. Look into making a controller for your content and doing the following:

  • GZIP your response
  • Far Future Expire: HttpResponse.ExpiresAbsolute = DateTime.Now.AddYears(5);
zowens
Most of the frameworks/libraries aforementioned do make use of the YUI compressor port. Although magic would be nice, I am most definitely trying to avoid wheel reinvention and learn from what others have experienced with previous efforts.
AlexanderN
A: 

ClientDependency is not in beta anymore and works well with MVC, I think is a very good candidate. AFAIK it does not use YUI but you can plug your own compressor.

Marc Climent