简体   繁体   中英

What's the best way to minify the ASP.NET generated Javascript?

What's the best way to minify the ASP.NET generated Javascript, such as the ones served by webresource.axd, in ASP.NET 3.5 at runtime? I tried using the MbCompression module but it's not working with those resources.

If you want to minify the ASP.NET AJAX JavaScript, ensure that you've updated the compilation section of your web.config to turn off Debug mode:

<compilation debug="false">

This will ensure that the ScriptResource files are minified, however unless you've supplied minified versions of your JS files, these won't be touched.

Have you taken a look at the Ajax Minifier described in this blog post by ScottGu ?

It might be just what you are looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM