Bundling and Optimizing
- Date: July 17, 2012 from 3:00PM to 4:00PM
- Day 1
- Speakers: Howard Dierking
- 9,991 Views
- 8 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Visual Studio 2012 will introduce optimization features for all ASP.NET project types. Howard Dierking shows you how to drastically shrink your response size as well as increase page download speed and site performance.
Already have a Channel 9 account? Please sign in
Follow the Discussion
This is great introduction to web optimization. I have one question regarding the extensibility model. I already have MSBuild target hooked up as part of VS2010 build process to generate minified javascript and css files using yuicompressor. What I would like to use is the caching feature of web optimization to generate unique url based on the hash of the minified files.
Is there any way to hook into web optimization model to not use bundling/minification and just leverage the caching module?
Regards,
Sunil Unnithan
Hi Sunil - yes, it's not pretty, but you should be able to use just the version stamping piece by doing 3 things:
We'll also look into making more modular support easier in future versions. Hope this helps.
_howard
Hi there,
Thanks for the great video, I do have one question though, it's pretty hard to know on NuGet what is the latest bundling version that will work with ASP.NET MVC 3?
On NuGet there is:
1) ASP.NET Optimization - Bundling 0.1
2) Microsoft ASP.NET Web Optimization Framework
1.0.0-beta3 (which has a later date than the first one)
3) Where is the version you are using?
Also the cdn feature isn't available in either of these packages
bundles.UseCDN <-- not found
It would be great if you could provide the version number or a link to which NuGet package you are actually using?
Thanks for your time and effort
Regards DotnetShadow
Great! Thanks for the tip Howard. Does the caching module generate correct cache control header "Cache-Control: no-transform" for the bundle files?
Regards,
Sunil Unnithan
@DotnetShadow: We renamed the package Microsoft.Web.Optimization to Microsoft.AspNet.Web.Optimization - that's why those 2 different packages exist. When we released the later version of Microsoft.AspNet.Web.Optimization, we also updated the Microsoft.Web.Optimization package version such that it contained no actual content - just a dependency to the renamed package. As such, it basically acts like a redirect.
For the different versions of Microsoft.AspNet.Web.Optimization, we follow the conventions outlined in the Semantic Versioning specification (http://semver.org). Therefore, we published a couple different pre-release versions and recently the first stable version (1.0.0).
The CDN feature is available in 1.0.0 (http://nuget.org/packages/Microsoft.AspNet.Web.Optimization/1.0.0) - I had put some code on my blog that referenced this code before we had pushed the final package to nuget.org. Sorry for the confusion there.
@Sunil Unnithan: no - need to look at adding this header. The plan going forward is that we'll provide you the ability to control much more about the response message from within your transform than we do today.
With the SquishIt library available and easy to use/setup, what is the benefit of using this solution? I'll play around with it when I have time, but SquishIt was super-easy to set up, and is very clear in its usage.
Hi, nice video.
Is it also possible to add a whole folder of e.g. css files to a bundle at once? So when you have like 5 files you can just refer to a folder?
Remove this comment
Remove this thread
close