无 Cookie 子域

发布于 2024-10-08 12:39:28 字数 180 浏览 0 评论 0原文

我有一个圆顶的名字。 www.abc.com

,我想加速 cookie 域中的所有图像和静态内容。

我需要做什么?

我想创建名为 static.abc.com 的新子域,但当时这两个域也带有 cookie。

我是用于托管的 dotnet 面板用户。

技术是.net

I have one dome name. www.abc.com

and i want to speedup all images an d static content from cookies domain.

what i require to do with that?

i want to create new sub domain with name static.abc.com but that time also cookie coming with both domain.

i am user dotnet panel for hosting.

technology is .net

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

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

发布评论

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

评论(2

蓦然回首 2024-10-15 12:39:28

有两种方法可以实现此目的。您可以为 www.abc.com 的 FQDN(完全限定域名)设置 cookie,但这会将 cookie 限制为 www.abc.com。这可能比您想要的更严格。

更常见的解决方案是为无 cookie 托管注册一个完全独立的域。许多网站已经使用了这种方法。

  • Google 使用 gstatic.com
  • Facebook 使用 twimg.com(我认为)
  • Yahoo 使用 yimg.com(我认为)
  • eBay 使用 ebaystatic.com
  • 等。

There are two ways to accomplish this. You could set the cookie for FQDN (fully-qualified domain name) of www.abc.com, but this would restrict the cookies to just www.abc.com. This may be stricter than you want.

The more common solution it to register a completely separate domain for cookieless hosting. This is used by many websites already.

  • Google uses gstatic.com
  • Facebook uses twimg.com (I think)
  • Yahoo uses yimg.com (I think)
  • EBay uses ebaystatic.com
  • etc.
倾听心声的旋律 2024-10-15 12:39:28

创建 Cookie 时,将其 Domain 属性设置为 ".abc.com",这样 Cookie 将由 www.abc.com 共享static.abc.com 子域。

When you create a cookie, set it's Domain property to ".abc.com", that way the cookie will be shared by both the www.abc.com and static.abc.com subdomains.

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