Home >Backend Development >PHP Tutorial >解决跨域取数据

解决跨域取数据

WBOY
WBOYOriginal
2016-06-06 20:40:391030browse

a网站设置了一个cookie,想要在b网站取。怎么解决cookie跨域的问题,使用jsonP?

回复内容:

a网站设置了一个cookie,想要在b网站取。怎么解决cookie跨域的问题,使用jsonP?

完全不同的域就没法共享cookie了

Access-Control-Allow-Origin

iframe

  • location.hash
  • window.name
  • postMessage

关于跨域取cookie的问题,参见我的博客:http://blog.csdn.net/yunnysunny/article/details/7748106
你说的没错,说白了还是jsonp

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