The System.Web.Optimization namespace includes classes that support Content Delivery Networks (CDN) and the process of optimizing JavaScript and cascading style sheet (CSS) files in a website to reduce file size and improve page performance. The classes in this namespace enable developers to carry out bundling and minification tasks to optimize their JavaScript and CSS files.
Questions tagged [system.web.optimization]
81 questions
28
votes
2 answers
IItemTransform and existing minified files
TL;DR: IItemTransform isn't getting executed when a minified file already exists in the same folder as the original (non-minified) file.
Problem explanation
I'm having this issue mainly because of CSS relative image references. If you used…

Robert Koritnik
- 103,639
- 52
- 277
- 404
15
votes
1 answer
Can you pre-cache ASP.NET Bundles?
Every time I deploy an MVC web application my server has to re-cache all js and css bundles.
Because of this it can take several seconds for the first view to render after deploying.
Is there a way to pre-cache bundles? After all, the files are…

Mark Rucker
- 6,952
- 4
- 39
- 65
11
votes
2 answers
How do I get System.Web.Optimization bundles to work with custom folders in an IIS virtual directory?
I have an asp.net mvc4. I have modules that are deployed as subdirectories within this application using IIS Virtual Directories and I need to reference files in these modules. These module dlls are registering bundles. But the bundles are not…

happyfirst
- 1,033
- 1
- 13
- 27
10
votes
1 answer
Bundling and minification of ES6 javascript files in an asp.net MVC web application
We know that System.Web.optimization does not support ES6 javascript files bundling and minification, So how to support that?

Simple Code
- 2,354
- 2
- 27
- 56
9
votes
4 answers
How do I add type="text/javascript" to a script tag when using System.Web.Optimization
I have the following
bundles.Add(new ScriptBundle("~/bundles/scripts/common").Include(
"~/Scripts/jquery.validationEngine.js",
"~/Scripts/common.js"));
Which generates