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