在 CDN 上托管 Microsoft Ajax?

发布于 2024-07-13 12:49:48 字数 517 浏览 5 评论 0原文

Google 免费托管流行的 ajax 库:

http://code.google.com/apis/ajaxlibs/

您可以利用他们的带宽、CDN最重要的是,用户可能已经从另一个从 google 检索其 JS 文件的网站缓存了它。

只是想知道 Microsoft AJAX 在任何地方是否也是如此? 或者我可以在微软网站上的某个地方“窃取”托管服务。

我自己将其托管在 Amazon A3 这样的 CDN 上还有什么好处吗? 我相信我不会解决同时下载数量问题,因为 Internet Explorer 会阻止下载脚本时。

Google hosts popular ajax libraries for free at :

http://code.google.com/apis/ajaxlibs/

You get to take advantage of their bandwidth, their CDN and most importantly that users may already have it cached from another site that is retrieving their JS files from google.

Was just wondering if the same is true for Microsoft AJAX anywhere? Or is there somewhere on Microsoft's site I could 'steal' the hosting from.

Also is there any benefit of me hosting it myself on a CDN like Amazon A3. I believe I wont solve the number of simultaneous downloads issue because internet explorer will block while a script is downloading.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ゝ偶尔ゞ 2024-07-20 12:49:48

Microsoft 今天推出了 Microsoft AJAX CDN,它将提供 Microsoft AJAX 和 jQuery 库。

Microsoft launched today the Microsoft AJAX CDN that will provide Microsoft AJAX and jQuery libraries.

绮筵 2024-07-20 12:49:48

您在这里问几个问题。

首先据我所知 YahooGoogle 是唯一一家为 JavaScript 库提供免费 CDN 托管的公司。

其次,过多的 DNS 查找会损害页面性能。 这是关于平衡 DNS 查找的成本与 CDN 与本地服务器的速度差异。 通常,CDN 和服务器之间的差异足够大,因此绝对值得从 CDN 获取公共库。

在理想的情况下,您应该使用尽可能少的主机名。 您的目标应该是从服务器获取 1 个 HTML 页面,从 CDN 获取 1 个 Javascript 页面,以及从 CDN 获取 1 个 CSS 页面。 如果您无法负担自己的 CDN 访问费用,则可以从您的服务器获取 1 个 HTML 页面,从 CDN 获取 1 个 Javascript 库,从您的服务器获取 1 个 Javascript 文件。 来自 CDN 的 1 个 CSS 库和服务器中的 1 个 CSS 文件就可以了。 那仍然只有 2 个主机。 性能指南指出 2-4 是您的理想值。

就使用 S3 作为预算 CDN 而言,您应该比较从 S3 和您自己的主机获取文件的速度,以评估这是否值得。 您使用的任何 CDN 都只有 1 个主机名,这一点非常重要。 因此,如果 S3 将请求重定向到 S3.1.amazon.com 和 S3.2.amazon 等,那么这不是一个好的解决方案。

我希望这有帮助。

You are asking a couple of questions here.

Firstly as far as I know Yahoo and Google are the only companies that offer free CDN hosting for JavaScript libraries.

Secondly, the thing that will hurt your page performance is excessive DNS lookups. It's about balancing the cost of a DNS lookup vs. the difference in speed of a CDN compared to your local server. Normally the difference between the CDN and your server is enough that it's definitely worth getting your common library from the CDN.

In an ideal world you should use as few hostnames as possible. You should be aiming for 1 HTML page from your server, 1 Javascript from CDN and 1 CSS from CDN. If you can't afford your own CDN access then 1 HTML page from your server, 1 Javascript Library from CDN, 1 Javascript file from your server. 1 CSS library from CDN and 1 CSS file from your server is fine. That's still only 2 hosts. The performance guidelines say 2-4 is your ideal.

In terms of using S3 as a budget CDN you should compare the speed of getting a file from S3 and your own host to evaluate if that is worth while. It's extremely important that any CDN you use only has 1 hostname. So if S3 redirects requests to S3.1.amazon.com and S3.2.amazon of whatever it wouldn't make a good solution.

I hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文