Home  >  Article  >  Backend Development  >  cookie怎么跨域有效

cookie怎么跨域有效

WBOY
WBOYOriginal
2016-06-13 13:52:41838browse

cookie如何跨域有效?
http://blog.xxx.com/   和   http://www.xxx.com/blog/

请问如何让cookie都有效?
最近被这事搞的比较郁闷。

------解决方案--------------------
/
------解决方案--------------------
document.domain
------解决方案--------------------
这是COOKIE路径.而应该是COOKIE域.
------解决方案--------------------
使用数据库吧,用数据库模拟存储cookie。这个好像稍微好弄一些。

其他的方法……有点难?
------解决方案--------------------
加上域名:
'.xxx.com '

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn