简体   繁体   English

Safari 8第三方Cookie未发送

[英]Safari 8 3rd party cookie not being sent

Domain A is loading domain B in an iFrame. 域A正在iFrame中加载域B。 In order for domain B to set a cookie in Safari (with "allow from current website only" configuration) we had to do some manipulations (user actions). 为了使域B在Safari中设置cookie(“仅允许当前网站访问”配置),我们必须进行一些操作(用户操作)。 However now the cookie isn't being sent (to domain B). 但是现在该cookie尚未发送(到域B)。

  1. domain A opens domain b in an iframe 域A在iframe中打开域b
  2. user clicks on a button, which opens a new tab with domain B 用户单击一个按钮,这将打开一个具有域B的新标签页
  3. the cookie is being set. cookie已设置。 Safari is now set with a cookie from domain B. Safari现在使用来自域B的cookie进行了设置。
  4. in the iframe we do window.location.href="url to domain B" - the cookie isn't being sent. 在iframe中,我们执行window.location.href =“到域B的网址”-未发送cookie。 If I browse to the same URL in a different tab I do see the cookie being sent. 如果我在其他选项卡中浏览到相同的URL,则确实会看到发送的cookie。

Has anyone encounter this as well? 有人也遇到过吗? Any known solutions? 任何已知的解决方案?

In mobile advertising space, a few years back, when apple disabled the 3rd party cookie on mobile safari, google (DFP) came out with the workaround to bypass the restriction by creating iframe on the page and set the cookies there. 在移动广告领域,几年前,当苹果公司禁用移动Safari上的第三方Cookie时,谷歌(DFP)提出了解决方法,可通过在页面上创建iframe并在其中设置Cookie来绕过限制。 It worked for a while till apple found out and blocked it. 它工作了一段时间,直到苹果发现并阻止了它。 As far as I know, there is no workaround to enable 3rd party cookies on mobile safari. 据我所知,尚无变通办法在移动Safari上启用第三方Cookie。

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

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