Many code examples, and the default RegisterBundles
method in BundleConfig.cs
generated by Visual Studio 2012 for a new MVC app, include code like this to add common JavaScript files like jQuery to a bundle:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
In a certain percentage of cases, the user's browser will already have those common files in its cache. So, it seems wasteful to wait for the file to be downloaded again via bundling.
Unless the browser can recognize that the bundled file (which may be concatenated with other files and minified) is already present, then it seems like this use of bundling would not speed things up at all, but rather cause unnecessary delays.
Or am I missing something here? Perhaps the probability is low that the "common" file (jQuery, etc.) is already cached?