OpenJudgeSystem icon indicating copy to clipboard operation
OpenJudgeSystem copied to clipboard

Use CDNs for the common libraries

Open NikolayIT opened this issue 10 years ago • 0 comments

public static void RegisterBundles(BundleCollection bundles)
{
    //bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
    //            "~/Scripts/jquery-{version}.js"));

    bundles.UseCdn = true;   //enable CDN support

    //add link to jquery on the CDN
    var jqueryCdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js";

    bundles.Add(new ScriptBundle("~/bundles/jquery",
                jqueryCdnPath).Include(
                "~/Scripts/jquery-{version}.js"));

    //...
}

NikolayIT avatar May 01 '14 11:05 NikolayIT