Reputation: 4618
Is it possible to add a url from another domain to the bundling in Microsoft.Web.Optimization
?
I want to add a reference to replace the following link:
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700' rel='stylesheet' type='text/css'>
My code for creating a css bundle which works with local files is as below:
Bundle cssCommon = new Bundle("~/cssCommon", typeof(CssMinify));
cssCommon.AddDirectory("~/content/", "aom.common.*", false);
BundleTable.Bundles.Add(cssCommon);
Upvotes: 0
Views: 149
Reputation: 6373
Actually leaving that content on the other host is probably a better thing to do.
The end user real world experience may actually be better as a result.
Upvotes: 1
Reputation: 18549
That doesn't really make sense because bundling reduces the number of requests from the website's server. Referencing goodleapis is obviously on another server.
There is the concept of CDNs though, and these can be changed depending on the release, this link has some useful information on using a CDN with Bundling and Minification.
Upvotes: 0