Combine and compress script files in asp.net mvc

Posted by victor_foster on Stack Overflow See other posts from Stack Overflow or by victor_foster
Published on 2010-03-14T12:59:56Z Indexed on 2010/03/14 13:05 UTC
Read the original article Hit count: 212

Filed under:
|
|
|
|

I am working in Visual Studio 2008, IIS7 and using asp.net MVC. I would like to know the best way to combine all of my Javascript files into one file to reduce the number of HTTP requests to the server. I have seen many articles on this subject but I'm not sure which one I should look at first (many of them are over a year old).

Here are the things I would like to do:

  1. Combine my Javascript and css files
  2. Safely compress my Javascript files when I publish, but keep them uncompressed while I am debugging
  3. Cache my Css and Javascript files but allow them to refreshed with a hard refresh when they are updated without having to rename them.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about JavaScript