开发者

Domains and cookie accessibility

If I am hitting www.foo.com and am writing some cookies there, will I have access to thos开发者_如何学Pythone cookies if I hit the same code base from www2.foo.com? Or does the cross-domain cookie security come into play with sub-domains as well?


If you set a cookie's domain as .example.com, it'll be available across all subdomains. If you set the domain as www.example.com, it'll only be accessible to the www subdomain.


Cookies set for foo.com will be accessible by sub-domains. Sub-domain cookies are not accessible by other sub-domains.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜