1 - Is this approach worth using? Why?
When we talk about website optimization, we need to look at every detail that can decrease processing or traffic, use Bundle allows you to make a grouping of multiple files into a single.
This grouping brings a number of advantages in the economy of bytes trafficked, in addition to providing a fairly efficient way of organizing the project.
2 - The Bundles of even staying inside the tag Scriptmanager
No. You can use the Bundleconfig class located in the App_start folder and add/declare the files you will use, for example:
using System.Web.Optimization;
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
...
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
...
}
}
Register the Bundle in the method Application_start:
void Application_Start(object sender, EventArgs e)
{
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterOpenAuth();
}
And add the page reference like this:
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
3 - I can keep referencing . css and . js the old way?
Yes.
References (in English):
Thanks. Very enlightening. Thank you!
– Jothaz