Heim >Backend-Entwicklung >PHP-Tutorial >解决跨域取数据

解决跨域取数据

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:40:391061Durchsuche

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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn