ASP.NET MVC4 Bundling with Twitter Bootstrap

The issue is most likely that the icons/images in the css files are using relative paths, so if your bundle doesn’t live in the same app relative path as your unbundled css files, they become broken links. We have rebasing urls in css on our todo list, but for now, the easist thing to do … Read more

Async loading of javascript files using MVC4 Bundling and HTML5 async attribute

If you upgrade to the 1.1-alpha1 release, you can just add the async attribute to the tag format either via: Scripts.DefaultTagFormat = @”<script src=””{0}”” async></script>” or passing it where you want the async tag Use following instead of Scripts.Render(“~/bundles/jquery”) Scripts.RenderFormat(@”<script src=””{0}”” async></script>”, “~/bundles/jquery”)

Cassette bundles vs MVC4 bundles

Information about ASP.NET MVC bundling is here: http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx. ASP.NET is adding a feature that makes it easy to “bundle” or “combine” multiple CSS and JavaScript files into fewer HTTP requests. This causes the browser to request a lot fewer files and in turn reduces the time it takes to fetch them. The next release of … Read more

Make ASP.NET bundling specify media=screen for CSS bundle

I’ve found a more elegant solution. I’m using the Styles.RenderFormat(format, bundle). I have a BundlesFormats class with a property called PRINT and I use it like so: public class BundlesFormats { public const string PRINT = @”<link href=””{0}”” rel=””stylesheet”” type=””text/css”” media=””print”” />”; } And in the cshtml: @Styles.RenderFormat(BundlesFormats.PRINT, “~/bundles/Content/print”)

MVC4 Less Bundle @import Directory

I’ve written a quick blog post about Using LESS CSS With MVC4 Web Optimization. It basically boils down to using the BundleTransformer.Less Nuget Package and changing up your BundleConfig.cs. Tested with bootstrap. EDIT: Should mention the reason I say this, is I also ran into the @import directory structure issue, and this library handles it … Read more

VS2012 – Web Forms – Bundling Confusion

UPDATE: This is a new blog post which also talks about this more: ASP.NET article Basically webforms + bundling looks like this due to a bunch of legacy behavior that we weren’t able to change in scriptmanager. In regards to your specific questions: Basically this is so deduping works correctly, script manager has a limitation … Read more

techhipbettruvabetnorabahisbahis forumu