I am using SquishIt for bundling and minification of css and js files in a asp.net mvc2 application.
I have used AddRemote method to download the jquery-1.7.1.min.js and jquery-ui-1.8.17.min.js from CDN in the release mode, but still I am seeing that the files are downloaded from the local copy instead from the CDN in release mode.
Code:
public static MvcHtmlString PackageLibs(this HtmlHelper htmlHelper)
{
var client = Bundle.JavaScript()
#if DEBUG
.Add("~/scripts/jquery-1.7.1.js")
.Add("~/scripts/jquery-ui-1.8.17.js")
#else
.AddRemote("~/scripts/jquery-1.7.1.min.js",
"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",true)
.AddRemote("~/scripts/jquery-ui-1.8.17.min.js",
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js",true)
#endif
.ForceDebug()
.Render("~/scripts/combined.js");
return new MvcHtmlString(client);
}
Screenshot:
Can anyone help me to know what is creating the issue?