How It WorksWhen ASP.NET encounters a request for a folder followed by a file extension (for example,
/Styles/css or /Scripts/js), it takes all files with the extension in the folder, combines them
into a single file, and then optimizes the code by removing unneeded code such as comments and
irrelevant whitespace. The result of this operation is streamed back to the browser as a single
file. To overcome caching issues, you don’t point to /Styles/css from your server code directly.
Instead, you call the ResolveBundleUrl method on the Bundles collection to create a path that
contains a cache key. Whenever the underlying files change, the cache key changes as well, which
causes the browser to fetch a fresh copy from the server. To enable the bundling and minification
in the first place, you call EnableDefaultBundles on the Bundles collection during the website’s
Start event in Global.asax.