网站内容分区值得吗?

发布于 2024-07-12 07:47:01 字数 232 浏览 3 评论 0原文

为了允许有关内容的多种策略...安全、cookie、会话等,我正在考虑将一些内容从我的网站移动到他们自己的域,并想知道它将带来什么样的红利(如果有的话)。

我知道 cookie 是特定于域的,并且会根据每个请求(即使是图像)发送,因此如果它们变得太大,可能会开始影响性能,因此以这种方式移动静态内容是有意义的(至少对我来说)。

因为我预计有人已经做过类似的事情,所以我想知道您是否可以提供一些关于优点和缺点的反馈。

In order to allow for multiple policies regarding content... security, cookies, sessions, etc, I'm considering moving some content from my sites to their own domains and was wondering what kinds of dividends it will pay off (If any).

I understand cookies are domain specific and are sent on every request (even for images) so if they grow too large they could start affecting performance, so moving static content in this way makes sense (to me at least).

Since I expect that someone out there has already done something similar, I was wondering if you could provide some feedback of the pros and the cons.

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

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

发布评论

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

评论(1

绝不服输 2024-07-19 07:47:01

我不知道有什么情况符合您的原因,无法在 HTTP 服务器的设置中进行控制,无论是 Apache、IIS 还是您可能使用的任何其他服务器。

我假设您的意思是您想将它们分成单独的主机,即 www1.domain.com www2.domain.com。 您是正确的,cookie 是特定于主机/域的。 但是,如果 www1 和 www2 仍然是同一台计算机,则实际上不会有任何收益。 如果您遇到负载问题并将其分配给两个不同的服务器,那么可能会有所收获。

如果您实际上指的是不同的域(www.domain1.com 和 www.domain2.com),我不确定您会寻求什么样的好处......

I don't know of any situation that fits your reasons that can't be controlled in the settings for the HTTP server, whether it be Apache, IIS or whatever else you might be using.

I assume you mean you want to split them up into separate hosts, ie www1.domain.com www2.domain.com. And you are correct that the cookies are host/domain specific. However, there aren't really any gains if www1 and www2 are still the same computer. If you are experiencing load issues and split it between two different servers, there could be some gains there.

If you actually mean different domains (www.domain1.com & www.domain2.com) I'm not sure what kind of benefits you would be looking for...

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