When does bundling and minification happen AppStart/FirstRequest

We are using ASP.NET MVC 4.5 for our website. We are tracking down some page load issues for our website and wanted to know when does bundling and minification happen .

When I register bundle in my application start

bundles.Add(new ScriptBundle("~/bundles/ourjavascriptcode").Include(
 "~/Scripts/file1.js",
 "~/Scripts/file2.js",
 "~/Scripts/file3.js"));
 }

and in my cshtml if I include

@Scripts.Render("~/bundles/ourjavascriptcode")
  • Will the files get bundled and minified in application start itself and get added to the BundleTable
  • Will the bundling and minification happen when the server receives the first call /bundles/ourjavascriptcode?v=XYZ (XYZ is version generated by csthml when i used Scripts.Render)
  • Will the bundling and minification happen again if I request the server with some call like /bundles/ourjavascriptcode?v=buildNumber (buildNumber generated by us every time with new build). We are doing this today because we use some static html pages which uses those bundles.
  • We are doing precompilation of our csthml pages

    链接地址: http://www.djcxy.com/p/69120.html

    上一篇: Windows环境中的Spring Security单点登录

    下一篇: 何时捆绑和缩小发生AppStart / FirstRequest