Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
       I'm Working on Google Charts for that we are using Google Visualization api. it is working fine as of now when I am adding that CDN to Bundle config and Call back to the local visualization api. for that i added following code in my Bundle config

C#
bundles.UseCdn = true;
bundles.Add(new ScriptBundle("~/Content/cdn", "https://www.google.com/jsapi").Include("~/Contente/SISReports/JS/jsapi.js"));

But it is not loading from the CDN. It is work fine when im giving like this in aspx page.

HTML
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script>
window.google|| document.write('<script type="text/javascript" src="~/Contente/SISReports/JS/jsapi.js"></script>')
</script>
<pre lang="text">
Suggest me the proper way to load the js from CDN
Posted
Updated 21-Jan-16 2:29am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900