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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742290811a4416151.html
评论列表(0条)