Should I link to Google API#39;s cloud for JS libraries?(我应该链接到 Google API 的 JS 库云吗?)
问题描述
我正在寻找拉动 jQuery & 的利弊.来自 Google API 云的其他 JS 库,而不是直接下载文件和部署.
I'm looking for the pros/cons of pulling jQuery & other JS libraries from Google API's cloud as opposed to downloading files and deploying directly.
你说什么?
lib 已经缓存在用户系统上的可能性对我来说是最重要的因素,所以我将使用指向 googleapis.com 的永久链接(例如 ajax.googleapis.com/ajax/libs/...).我同意这里的其他人的观点,即失去对 Google 服务器云的访问权限是最小的问题.
The likelihood of the lib already cached on the users system is the overriding factor for me, so I'm going with a permalink to googleapis.com (e.g. ajax.googleapis.com/ajax/libs/…). I agree with others here that loss of access to the Google server cloud is a minimal concern.
推荐答案
优点:它可能已经缓存在用户的系统上.谷歌有很大的管道.您无需为带宽付费.
Pros: It may already be cached on the user's system. Google has big pipes. You don't pay for the bandwidth.
缺点:您现在有两种不同的方式使您的网站变得不可用:您的服务器上的服务中断或 Google 的服务器上的一种中断.
Cons: You now have two different ways for your site to become unavailable: A service interruption on your server or one on Google's server.
这篇关于我应该链接到 Google API 的 JS 库云吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我应该链接到 Google API 的 JS 库云吗?


基础教程推荐
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01