Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions KnowledgeBase/App_Start/BundleConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ public static void RegisterBundles(BundleCollection bundles) {
bundles.UseCdn = true;

var jqueryCdnPath = "//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js";
var cacheKey = "d9b3dfd57f8c40c9-b3b294615be571d4";
var myKnowledgeCdn = "http://myknowledge.azureedge.net/{0}?" + cacheKey;

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

bundles.Add(new ScriptBundle("~/bundles/javascript").Include(
bundles.Add(new ScriptBundle("~/bundles/javascript", string.Format(myKnowledgeCdn, "bundles/javascript")).Include(
"~/Scripts/vendor/readmore.js",
"~/Scripts/vendor/bootstrap.js",
"~/Scripts/vendor/masonry.pkgd.js",
Expand All @@ -21,7 +24,7 @@ public static void RegisterBundles(BundleCollection bundles) {
"~/Scripts/vendor/toastr.js",
"~/Scripts/app/serializeObject.js"));

bundles.Add(new ScriptBundle("~/bundles/javascript/app").Include(
bundles.Add(new ScriptBundle("~/bundles/javascript/app", string.Format(myKnowledgeCdn, "bundles/javascript/app")).Include(
"~/Scripts/main.js",
"~/Scripts/app/application.js",
"~/Scripts/app/myShortcuts.js",
Expand All @@ -35,12 +38,12 @@ public static void RegisterBundles(BundleCollection bundles) {
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/vendor/modernizr-*"));

bundles.Add(new StyleBundle("~/bundles/css").Include("~/Content/css/*.css", new CssRewriteUrlTransform()));
bundles.Add(new StyleBundle("~/bundles/css/main").Include("~/Content/css/app/main.css"));
bundles.Add(new StyleBundle("~/bundles/css", string.Format(myKnowledgeCdn, "bundles/css")).Include("~/Content/css/*.css", new CssRewriteUrlTransform()));
bundles.Add(new StyleBundle("~/bundles/css/main", string.Format(myKnowledgeCdn, "bundles/css/main")).Include("~/Content/css/app/main.css"));
bundles.Add(new StyleBundle("~/bundles/css/blank_main").Include("~/Content/css/app/blank_main.css"));


//BundleTable.EnableOptimizations = true;
BundleTable.EnableOptimizations = true;
}
} //class
}
17 changes: 17 additions & 0 deletions KnowledgeBase/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<location path="Scripts">
<system.webServer>
<staticContent>
<!--<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:00:15" />-->
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00"/> <!-- one day -->
</staticContent>
</system.webServer>
</location>
<location path="Content">
<system.webServer>
<staticContent>
<!--<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:00:15" />-->
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00"/>
<!-- one day -->
</staticContent>
</system.webServer>
</location>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
Expand Down