简体   繁体   English

使用 iframe 将第三方 cookie 设置为 safari。 不支持 P3p 标头

[英]Set third-party cookies with iframe into safari. P3p header is not supported

I am facing a problem in safari.我在 safari 中遇到了问题。 i can't set third-party cookies or Session with iframe into safari.我无法将第三方 cookie 或带有 iframe 的会话设置为 safari。 I tried p3p header but its not working.我试过 p3p 头,但它不工作。 ... its working in IE ...它在 IE 中工作

below the header scripts ....在标题脚本下方....

header('P3P: CP="NOI ADM DEV COM NAV OUR STP"');
header('P3P: CP="CAO PSA OUR"');
header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR  IND CNT"');
header('P3P: CP=HONK');
header('P3P: CP="CAO PSA OUR"');
header('P3P: CP="HONK"');

Not sure if this helps you, but I created an NPM module for setting cookies across domains.不确定这是否对您有帮助,但我创建了一个 NPM 模块来跨域设置 cookie。 If you wanted to use JS to set/get the cross-domain cookie, this may work better.如果您想使用 JS 来设置/获取跨域 cookie,这可能会更好。

https://www.npmjs.com/package/cookie-toss https://www.npmjs.com/package/cookie-toss

Hope this helps!希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM