jquery - 当热链接到 jQuery 时,应该链接到 Google 还是 jQuery 站点?

标签 jquery cdn

在 jQuery download section 中,有3个主要的CDN主机供公众使用。 code.jquery.com 就是其中之一。他们是否在 CDN 游戏中出现较晚,这就是为什么谷歌和微软排在第一位的原因?链接到其中哪一个更好?

我想 jQuery 应该是您链接到的那个,因为那是代码的来源。不过,事实证明,Google 相当强大。

最佳答案

我总是链接到 Google CDN。 官方方式的缺点是http请求太多而无法最终获取脚本。 还有更多关于它的内容: http://encosia.com/3-reasons-why-you-should-let-google-host-jquery-for-you/

至于链接到最新版本 - 这并不总是最好的主意(兼容性问题)。

关于jquery - 当热链接到 jQuery 时,应该链接到 Google 还是 jQuery 站点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6934928/

相关文章:

javascript - 在 for 循环中克隆

javascript - ajax 响应附加到选择选项

codeigniter - 托管大型图像库的最佳实践

google-cloud-platform - 谷歌云 CDN 卡在 0% 缓存命中率

javascript - 多选分层下拉

javascript - jQuery 可折叠 div,折叠第二个 div

javascript - 简单的图像循环

javascript - 使用带有 <img> 标签的 CDN

javascript - 内容安全策略阻止 CDN

angularjs - 是否有任何自动化的 [grunt] 任务可以在 index.html 中为 CSS/JS 文件添加 CDN?