Questions tagged [scriptbundle]

Bundling is a new feature in ASP.NET 4.5 that 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.

Bundling is a new feature in ASP.NET 4.5 that 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.

38 questions
0
votes
0 answers

Getting 404 for ScriptBundle on remote IIS 7.5 server and localhost

I've configured bundles in ASP.NET BundleConfig.cs file. ScriptBundle thirdPartyScripts = new ScriptBundle("~/bundles/js"); thirdPartyScripts.Include( "~/js/flowtype.js", "~/js/moment.js", "~/js/livestamp.min.js", …
Liron Harel
  • 10,819
  • 26
  • 118
  • 217
0
votes
0 answers

Preserve formatting and comments in Script Bundle

I have an api I built which is split into many files and have configured script bundles to build them into one. I want to provide two urls for the api to other teams in my company. One Api will be fully minimized and is working as intended. The…
Ryan Mann
  • 5,178
  • 32
  • 42
0
votes
1 answer

How to enable caching on a bundle accessed from an external site?

I'm trying to enable client js caching for a asp.net mvc bundle added to an external site. Currently the site references the js bundle by using url https://example.com/bundles/myscriptbundle. Looking at the response from the server I always seem…
NullReference
  • 4,404
  • 12
  • 53
  • 90
0
votes
1 answer

ScriptBundle and jQuery minification causes issues with addEventListener

I'm putting this up as a way to save people time. I'm using jQuery 1.11.3, and MVC with ScriptBundle On large pages I started getting errors calling addEventListener in ready.promise Funnily enough, given u = document; u.addEventListener =…
0
votes
1 answer

Manually utilize MVC script bundling

Is there a way to programmatically render a script bundle? Using script bundles in MVC is great. Like it. Use it. Now I'm writing an application that uses Self-Host WebApi in which I'd like to also create a script bundle. That is, I have a number of…
0
votes
1 answer

ASP.NET MVC ScriptBundle adding jquery 2.0.2 even though 2.0.3 is specified

When I run my application locally, the javascript references work as expected, but when I deploy it to our dev servers, it adds jquery 2.0.2 reference right before the 2.0.3 reference. Why is it adding this? I'm guessing it shouldn't interfere since…
Paul Reedy
  • 360
  • 3
  • 10
0
votes
1 answer

Custom Binding triggers error with Script Bundle in Production

I have the following KnockoutJS custom binding: ko.bindingHandlers.dtp = { init: function (element, valueAccessor, allBindingsAccessor) { //initialise datetimepicker with some optional options var options =…
daveywc
  • 3,136
  • 7
  • 45
  • 58
-2
votes
1 answer

How to render Views or Partial Views of scripts at the bottom in _Layout.cshtml?

I have a problem in rendering few of my partial view’s script tags should render at the bottom in _Layout.cshtml page.
sridharnetha
  • 2,104
  • 8
  • 35
  • 69
1 2
3