jquery - 我应该在生产代码中使用 Google 的 JSAPI 吗?

标签 jquery html jsapi

可能重复:

should-i-link-to-google-apis-cloud-for-js-libraries

还有许多其他讨论,包括:

Where do you include the jQuery library from? Google JSAPI? CDN? Best way to use Google's hosted jQuery, but fall back to my hosted library on Google fail


我正在查看 Tiny MCE 插件示例,并在文档的 head 中看到了这段代码:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
    google.load("jquery", "1.3");
</script>

我从未见过这种加载 jQuery 的方式。

  • 这是否推荐用于生产?
  • 这种方法有什么好处?

最佳答案

是的,绝对是。 Google encourages it .每个人都受益。它更有可能在他们的缓存中,并且您必须提供的文件少了一个。

关于jquery - 我应该在生产代码中使用 Google 的 JSAPI 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1106755/

相关文章:

php - 如何在javascript中调用$_SESSION

javascript - css (this) 元素和输入背景颜色

javascript - 分别查找特定类(class)的 child 的序列号

html - skew() 函数深入

google-api - Google 自定义搜索引擎的自定义 CSS

javascript - 获取 YouTube 播放列表的引用

javascript - Spidermonkey:实现 "this"?

jquery - 我如何使用 jQuery 隐藏或显示基于 asp.net 角色的表行?

html - 如何在没有javascript的情况下将iframe扩展到文档高度?

javascript - 在元素符号上为图像 slider jquery添加功能