Cookies across multiple TLDs?

五迷三道 提交于 2020-01-07 03:16:09

问题


I know how to make a cookie work across subdomains (set .example.com as the domain), but on my latest project I have multiple domains like so:

example.co.uk
example.net
example.biz
...

Is it possible to make cookies work across these domains? Semi-related, can I make localStorage work across these domains too?


回答1:


Cookies don't work that way. You would need to have at least two levels of the domain to be the same in order to use cookies eg- xyz.example.com and abc.example.com are common at 2 levels.



来源:https://stackoverflow.com/questions/15391241/cookies-across-multiple-tlds

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!