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 库云吗?


基础教程推荐
- npm start 错误与 create-react-app 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01