4. Need for OPtimization
Browser limit simultaneous connections
6 simultaneous connection per hostname
Six request processed at a time
Additional request queued by browser
6. Bundling
New Feature of ASP.NET 4.5
Combine or Bundle multiple files into a single file
Create CSS/JavaScript & other bundles
Fewer file = Fewer HTTP calls
Improves first page load experience
13. Using in ASP.NET MVC
Configure Bundles on App_Start
Add Bundles to BundleCollection
Common Convention:
Selecting “.min” file for release when “XYZ.min.js” and “XYZ.js” exist
Selecting the non “.min” for debug
Ignore “-vsdoc” files
Can you use wild cards matching
E.g. jquery-{version}.js – will use appropriate version. Helps update using JQuery using Nuget
Use Styles.Render() and Scripts.Render() to reference the bundles