I have couple of questions for the optimization of application and i hope GURUs will help me to select the best approach.
Bundling and Minification
When working with asp.net mvc, I believe that we have bundling. With reference to following lin k, http://ift.tt/1tHBXlU
ASP.NET Optimization framework caches the bundle response in HttpContext.Cache and uses a CacheDependency.
The bundle file name is a hash of the bundle contents which ensures the URL changes when any of the bundle files are modified. The bundle's virtual path is used as the cache key.
Bundles set the HTTP Expires Header one year from when the bundle is created.
Caching in Web.config:
<configuration> <system.webServer> <caching> <profiles> <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" /> <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" /> </profiles> </caching> </system.webServer> <configuration>
My basic question is
- which approach is better to optimize performance from both above mentioned techniques? and Why?
- What will be the impact of both, preferring Bundling and Minification on Caching js Files in Web.Config and preferring Caching js files on Bundling and Minification?