I am planning to use MS Ajax Minifier with Asp.Net MVC 2.0 for handling 开发者_如何学运维the Js and Css files. Does anyone has experience with MS Ajax Minifier? I have following questions regarding this.
- Is it the best way to use JS/CSS files in Asp.Net MVC or is there a better way. E.g. YUI Compressor, Telerik Extension for MVC?
- As I understand we can use this to convert SomeFile.js to SomeFile.min.js at the build time. However In my mvc Views I still have the Script reference pointing to SomeFile.js. How does the browser will pick the SomeFile.min.js file?
- It's one possibility to use. The integration when building is a nice asset and it has hypercrunching.
- You must use the
SomeFile.min.js
in your script reference. But in Visual Studio you can have an uncompressed file with this nameSomeFile-vsdoc.js
for intellisense coding (in which you can also use xml comments which will be picked up by VS.
Another approach would be to use SquishIt.
Grz, Kris.
精彩评论