Questions tagged [asp.net-optimization]

Questions related to the ASP.NET Microsoft.AspNet.Web.Optimization nuGet package (System.Web.Optimization namespace), which supports bundling and minification of javascript and css files.

Project homepage: https://archive.codeplex.com/?p=aspnetoptimization

The Web optimization framework is installed via NuGet at https://nuget.org/packages/Microsoft.AspNet.Web.Optimization

Description:

The ASP.NET Web optimization framework provides services to improve the performance of your ASP.NET Web applications. Current services provided by the framework include:

bundling - combining multiple scripts or style resources together into a single resource, and thereby requiring browsers to make fewer HTTP requests

minification - making scripts or styles smaller using techniques such variable name shortening, white space elimination, etc.

Additionally, the framework has multiple extensibility points, enabling you to add new services over time.

174 questions
0
votes
1 answer

using System.Web.Optimization can I mix css and .less files in the same bundle?

It does not look like this is possible because LessTransform will be applied only once all the files have been merged and minified. public class LessTransform : IBundleTransform { public void Process(BundleContext context, BundleResponse…
smnbss
  • 1,031
  • 1
  • 10
  • 21
0
votes
2 answers

Bundling and Minification finding wrong file

So I'm having trouble all of a sudden where when I do my bundling and minification it pulls up the wrong file version. bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-{version}.js")); bundles.Add(new…
0
votes
2 answers

.Net MVC Controller force cache refresh depending on situation

I have a controller action that returns the Average of a series of measurements from a group of tests. The controller basically gets the data-points from all the tests within the group specified and then returns the average of all the data points.…
lamarant
  • 3,243
  • 2
  • 25
  • 30
0
votes
2 answers

How to bundle specific CSS according to browser version?

I'm using MVC4 StyleBundle to bundle up a bunch of CSS. There is one CSS that's only needed for IE 9 or lower. In my BundleConfig class of RegisterBundles method, I have: if…
Ray Cheng
  • 12,230
  • 14
  • 74
  • 137
0
votes
1 answer

Unable to Bundle JQuery Mobile 1.2 in ASP.NET MVC 4 app

I'm working on an ASP.NET MVC 4 app. This app leverages bundling to improve performance. Previously, the app was using jquery.mobile-1.1.0.js. Everything worked fine. However, I've upgraded to JQuery Mobile 1.2 and when I load my screen, I always…
0
votes
1 answer

ASP MVC4 Using default bundles rather than my own bundles?

I have the following code in my Application_Start(): protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); …
Angela
  • 3,269
  • 3
  • 22
  • 24
0
votes
3 answers

bundling script files in web application with asp.net optimization framework

I'm using following code to bundle my web application scripts, but it does not generate bundled script Bundle bundle = new Bundle("~/miniscripts/"); bundle.Include( "~"+ Paths.Scripts.AdminSkin.js.old_browsers_js, …
r.zarei
  • 1,261
  • 15
  • 35
0
votes
1 answer

Visual Studio 2012 ASP.NET bundling fails part way through

I'm trying to setup VS 2012's new bundling functionality (via the Microsoft.Web.Optimization package - read more here) and for the most part, everything is working alright. The problem is that the processing just gives up after ~15000…
mbeasley
  • 4,864
  • 5
  • 27
  • 39
0
votes
1 answer

Execute javascript from bundles in Document.ready

I use the MVC4 default template. I add a script : MyScript.js in /Scripts/MyApp/ with a function : function Testing() { alert('test'); } In the global.asax : bundles.Add(new ScriptBundle("~/bundles/myapp").Include( …
TheBoubou
  • 19,487
  • 54
  • 148
  • 236
1 2 3
11
12