Questions tagged [bundling-and-minification]

Bundling and minification are used to optimize web content by reducing the number of requests to the server and as well as the size of requested assets (such as CSS and JavaScript).

Bundling makes it easy to combine or bundle multiple files into a single file. You can create CSS, JavaScript and other bundles. Fewer files means fewer HTTP requests and that can improve first page load performance.

Minification performs a variety of different code optimizations to scripts or CSS, such as removing unnecessary white space and comments and shortening variable names to one character.

References:

  1. Bundling and Minification
  2. Adding Bundling and Minification to ASP.NET Web Forms
  3. Adding Web Optimization to a Web Pages Site
  4. Performance Implications of Bundling and Minification on Web Browsing
1258 questions
0
votes
1 answer

Figure out exactly what Rejuicer is doing

I need some help with Rejuicer. I just inherited a C# webapplication that uses it and I cannot figure out what exactly is going on. in the global.asmx.cs under Application_Start we are OnRequest.ForJs("~/Combined-{0}.js") .Combine …
0
votes
1 answer

Bundling and Minification with .net loses image references within CSS

I realize this has been asked through out the web, but i cant seem to find a definitive answers on how to resolve this issue. this is how we are bundling // iPortal Specific bundles.Add(new StyleBundle("~/bundles/css/MyCSS") …
Simon
  • 1,412
  • 4
  • 20
  • 48
0
votes
2 answers

rebuild url with mvc bundle

On the website I'm building we are using the built in bundling and minification. We render our scripts by using the @Scripts.Render @Scripts.Render("~/bundles/scripts") it generates a link…
0
votes
1 answer

Does anybody know a plugin to bundling js/css files in netbeans?

The available JS/Css Plugin can only minify files so far. Is there any work-a-around to create bundled files?
matt.m.atze
  • 45
  • 1
  • 6
0
votes
1 answer

Using knockout-jqueryui with bundling

According to "Reference bundles on requirejs" the solution to the problem of getting requirejs to reference modules delivered in a bundle is to name them with a name exactly matching the filename so that with optimisations turned off they resolve…
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
0
votes
1 answer

Absolute path generated by ASP.NET Bundling - how to generate relative path instead?

I am trying to get ASP.NET Bundling to change the way it generates paths for JS/CSS bundles. If my site is hosted on http://example.com/myapp and i use Scripts.Render("~/bundles/js") and Styles.Render("~/bundles/css"), this is what i get:
David McClelland
  • 2,686
  • 4
  • 28
  • 37
0
votes
2 answers

Relative paths and Bundle configuration

I have the folowing in my BundleConfig.cs file: bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/mainstyle.css", "~/Content/layout/style.css", /* <<< HERE, the folder is different */ …
serhio
  • 28,010
  • 62
  • 221
  • 374
0
votes
1 answer

How to use Script bundle and Intellisense reference together

how do I combine Script bundle of MVC application bundles.Add(new ScriptBundle("~/bundles/jquery") .Include("~/Scripts/jquery-{version}.js")); and JavaScript reference directives for IntelliSense so that I do not need to specify a version…
TarasB
  • 2,407
  • 1
  • 24
  • 32
0
votes
1 answer

Bundle is loaded in the wrong order

In my _Layout view I'm including the following scriptbundle: bundles.Add(new ScriptBundle("~/bundles/js").Include( "~/Scripts/jquery.min.js", "~/Scripts/jquery-ui.min.js", …
0
votes
0 answers

MVC4 Bundling kendo.common.css

I'm having problems bundling kendo.common.css in my web app. After bundling and running in IE9, the styles are not applied and it appears to be breaking when it reaches @media screen and (-ms-high-contrast: active) and (-ms-high-contrast: none).…
AJ72
  • 168
  • 1
  • 12
0
votes
1 answer

Understanding minification

I have the following bundling config: bundles.Add(new ScriptBundle("~/bundles/superfish").Include( "~/Scripts/superfish.js", "~/Scripts/supersubs.js", "~/Scripts/hoverIntent.js")); bundles.Add(new…
serge
  • 13,940
  • 35
  • 121
  • 205
0
votes
2 answers

is Scripts/Home a reserved name for bundle?

If i do //BundleConfig.cs bundles.Add(new ScriptBundle("~/Scripts/Home").Include("~/Scripts/Home/Home.js")); //index.cstml @section scripts { @Scripts.Render("~/Scripts/Home") } then the script is not going to get rendered in release mode, it…
Steve
  • 11,696
  • 7
  • 43
  • 81
0
votes
2 answers

What js/css files should I bundle?

I am looking into the bundling features of ASP.NET 4.0 and am just curious what rules/practices people follow when deciding which files to bundle? Should I group things by what they are, like put all jQuery files together or is it a good idea just…
aw04
  • 10,857
  • 10
  • 56
  • 89
0
votes
2 answers

Using breeze with ASP.NET bundling and minification

The JavaScript Breeze Client NuGet package has an unusual JavaScript file pairing: there is a breeze.min.js and a breeze.debug.js. More typical is foo.js and foo.min.js, which is straightforward to use with ASP.NET bundling and minification: just…
Edward Brey
  • 40,302
  • 20
  • 199
  • 253
0
votes
1 answer

Querystring is added in javascript bundles in asp.net mvc 4 when optimization disabled

I am debugging the application.SO Just disabled the bundles in global.asax BundleTable.EnableOptimizations = false; Even though the querystring is added to the script url…
sathishkumar
  • 1,780
  • 4
  • 20
  • 31