我正在寻找拉动 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 库云吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
即使在调用 abort (jQuery) 之后,浏览器也会等待Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在调用 abort (jQuery) 之后,浏览器也会等待 ajax 调用
JavaScript innerHTML 不适用于 IE?JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不适用于 IE?)
XMLHttpRequest 无法加载,请求的资源上不存在“AXMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 无法加载,请求的资
XHR HEAD 请求是否有可能不遵循重定向 (301 302)Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 请求是否有可能不遵循重定向 (301 302))
XMLHttpRequest 206 部分内容XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分内容)
XMLHttpRequest 的 getResponseHeader() 的限制?Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)