code.jquery.com对特定IP无响应.他们会节流吗? [英] code.jquery.com unresponsive from specific IP. do they throttle?

查看:445
本文介绍了code.jquery.com对特定IP无响应.他们会节流吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我们遇到了一个有趣的问题,code.jquery.com无法从我们的IP地址之一进行响应.

Today we had an interesting issue where code.jquery.com was unresponsive from one of our ip addresses.

我只是想知道他们是否受到限制或使用限制,或者其他人在连接到他们的网站时遇到任何问题.

I was just wondering if they have throttling or usage limits, or if anyone else has had any problems connecting to their site.

这尤其成问题,因为这意味着我们浏览到的任何站点都需要从code.jquery.com提取库,这取决于它们包含库的方式,因此也不会加载或加载缓慢. (即尝试下载jquery ***.js组件时会卡住).

It is especially problematic, because it means that any site we browse to that needs to pull libraries from code.jquery.com, also doesn't load or is slow to load depending on how they've included the library. (ie. it just gets stuck trying to download the jquery***.js component).

希望有人可以提供一些线索. :)

Hope someone can offer some clues. :)

推荐答案

根据我的经验,我从未遇到过节流的任何问题,而且我不知道实施过任何节流.

I've never run into any issues with throttling in my experience, and I know don't know of any throttling implemented.

在发生这些问题时,我已经开始使用本地备用,以使事情继续进行.您可以通过执行以下操作来做到这一点:

I've started to use a local fallback in the event of these issues just so things continue to operate. You can do that by doing something like:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if (!window.jQuery)
{
    document.write('<script src="/assets/js/jquery.js" type="text/javascript"><\/script>');
}
</script>

如果要更新本地版本,请仅使用CDN版本更新本地版本.这将为您提供CDN版本和本地版本两全其美的优势,因此无论如何都可以继续工作.

Just update the local version with the CDN version if you ever update the versions. This will give you the best of both worlds, a CDN version, and a local version so things continue to work no matter what.

这篇关于code.jquery.com对特定IP无响应.他们会节流吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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