使用多个服务器/域加速网站加载

发布于 2024-08-24 23:09:50 字数 258 浏览 11 评论 0原文

Yahoo!开发人员指南说“从用户的角度来看,跨多个地理位置分散的服务器部署您的内容将使您的页面加载速度更快”。

作为我在某处读到的解释,浏览器将同时从同一域加载最多 5 个内容。

在前面的声明中,子域(例如 cdn.example.com)是否会被视为新域?

When Yahoo! developer guide says "Deploying your content across multiple, geographically dispersed servers will make your pages load faster from the user's perspective".

And as an explanation I read somewhere, that browsers will load up to 5 things simultaneously from the same domain.

Would a subdomain, for example cdn.example.com be considered a new domain, in the previous statement?

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

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

发布评论

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

评论(1

迟月 2024-08-31 23:09:50

Yahoo:HTTP/1.1 规范建议浏览器并行下载不超过两个组件每个主机名。如果您从多个主机名提供图像,则可以并行进行两次以上的下载。

Google 还表示您只需要不同的主机名。

这可能取决于浏览器,但我相信它们可能需要有不同的IP地址。 HTTP 规范真正说的是:“使用持久连接的客户端应该限制它们与给定服务器保持的同时连接的数量。”

因此最安全的选择是具有不同的主机名和地址。

Yahoo: The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel.

Google also says you only need different host names.

This may depend on browser, but I believe they may need to have different IP addresses. All that HTTP spec really says is: "Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server."

So the safest choice is to have different host name AND address.

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