在Google托管jQuery是否有任何问题/劣势? [英] Any problems/disadvantages hosting jQuery at Google?

查看:72
本文介绍了在Google托管jQuery是否有任何问题/劣势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说有些人在访问其站点时遇到问题,这些站点由于其公司防火墙而从Google获得了jQuery,而不喜欢从其他站点获取代码的站点,即跨站点脚本?

I heard that some people where having problems accessing their sites which get their jQuery from Google since their corporate firewall didn't like sites getting code from other sites, i.e. cross-site scripting?

有人遇到这样的问题吗?

Has anyone run into problem such as this?

推荐答案

一个问题是 Google的服务器可能并且确实在最坏的情况下瘫痪了.在我对问题的回答"您最不舒服的编程经验是什么?",我回答:

One problem is that Google's server can and do go down at the worst possible times. In my answer to the question "What was your most uncomfortable programming experience?", I answered:

我正在演示团队的新网站 适用于一群潜在的人 用户.我花了几分钟说话 关于Google的所有很酷的东西 可视化API可以做到,因为我们 在我们中大量使用它 应用.为了演示,我决定 绘制几组数据 以前收集的.原本是 传达信息:看有多容易 它是!普通人可以做得很好 使用我们的产品查看图表."

I was demonstrating my team's new web application to a group of potential users. I took a few minutes to talk about all the cool stuff the Google Visualization API can do, since we were using it heavily in our application. To demonstrate, I decided to graph a few sets of data we have collected previously. It was intended to convey the message: "Look how easy it is! Regular people can make good looking graphs using our product."

幸运的是, Google 托管Java脚本的服务器 使用所需的文件 可视化API决定停止 在我的演示中途工作. 我坐在椅子上,凝视着 屏幕,喃喃自语但是...但是 他们是Google ...他们的服务器无法 下去."该团队试图大笑它 关闭,但是每个人都意识到了这一点 依靠的瞬间有多危险 在任何第三方(甚至与 Google)真正重要.

As luck would have it, the Google servers that hosted the Javascript files necessary to use the Visualization API decided to stop working midway during my presentation. I sat in the chair, staring at the screen, mumbling to myself "but... but they're Google... their servers can't go down". The team tried to laugh it off, but everyone realized at that moment how dangerous it can be to rely on any third party (even one as big as Google) when it really counts.

我知道这似乎不太可能,但是除非您真的没有其他选择,否则我建议不要在第三方服务器上托管关键文件,即使它们是Google的服务器也是如此. 让客户抱怨停电是不好的.让客户抱怨不是您的错,而您无法解决的断电更糟.

I know it seems unlikely, but unless you really have no other choice, I would recommend against hosting critical files on third-party servers, even if they are Google's servers. Having customers complain about an outage is bad. Having customers complain about an outage that isn't your fault and that you can't solve is even worse.

这篇关于在Google托管jQuery是否有任何问题/劣势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆