admin管理员组文章数量:1332389
I've noticed <script type="text/javascript" src="/bundles/jqueryval"></script>
Will merge the files into a single HTTP request
But if I use the @Scripts.render I.E @Scripts.Render("~/bundles/jqueryval")
They are still separate HTTP requests/files?
I've noticed <script type="text/javascript" src="/bundles/jqueryval"></script>
Will merge the files into a single HTTP request
But if I use the @Scripts.render I.E @Scripts.Render("~/bundles/jqueryval")
They are still separate HTTP requests/files?
Share edited Sep 1, 2012 at 9:59 Hao Kung 28.2k6 gold badges85 silver badges93 bronze badges asked Aug 14, 2012 at 0:54 williamsandonzwilliamsandonz 16.5k23 gold badges106 silver badges189 bronze badges2 Answers
Reset to default 5Make sure you are running in Release mode:
<pilation debug="false" targetFramework="4.0" />
if you want the scripts to be minified and bundled into a single one.
You can also force it by code with BundleTable.EnableOptimizations = true;
at BundleConfig
by popular request I add it as an answer
本文标签: javascriptASPNET MVC ScriptsRender not merging filesStack Overflow
版权声明:本文标题:javascript - ASP.NET MVC Scripts.Render not merging files..? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742290811a2447759.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论