【发布时间】:2013-04-21 15:22:58
【问题描述】:
我在这里看到:Where do you include the jQuery library from? Google JSAPI? CDN? 这是从 CDN(Google 的)包含 jQuery 的好方法:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
由于 jQuery 2 刚刚发布,我打算使用:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
...还有最新的 jQueryUI:
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
注意:这些 sn-ps 与上面链接的 Stack Overflow 上的“规范答案”相同,来自 google 的 jQuery CDN 页面:https://developers.google.com/speed/libraries/devguide#jquery-ui
现在我的问题是:在 WebMatrix 项目中,对 CDN 的引用应该放在哪里?在 网络配置? _AppStart.cshtml? _SiteLayout.cshtml?还是……???
【问题讨论】:
标签: jquery google-api cdn webmatrix