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

青春壹個敷衍的年華 提交于 2019-12-22 03:45:05

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/1670563/whats-the-best-way-to-minify-the-asp-net-generated-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!