PHP多个cookie不工作在iPad / iPhone浏览器 [英] PHP multiple cookies not working on iPad / iPhone browser

查看:322
本文介绍了PHP多个cookie不工作在iPad / iPhone浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的应用程序是一个基于iframe的电子商务购物车;购物车会话存储在访问域中。当用户签出iframe时,会向我们的SAAS(它清除我们的域的跨域cookie)部署一个弹出登录。弹出登录验证后,弹出窗口关闭,并且iframe刷新并加载用户的签出与他们存储的信息(一切正确)。



问题区域:我的应用程序部署了多个cookie(购物车会话,引用),并且通过http查询过渡到iframe。网站等),似乎只有在iPhone和iPad的safari,标题不显示多个cookie设置。只有一个正在设置。请记住,我有我的PHP报头声明有效的多个Cookie(或技术上允许多个标头)。显然问题是在客户端网站移动浏览器上,任何其他人都有这些问题?



通过Apple Bug Reporter PID#13966978报告。


原因是通过新的弹出窗口安装一个新的域(设置cookie与域信息+标记为安全)的技术没有工作。

p>

您必须先在第一行添加一个简单的cookie,而不添加任何标志,例如:

  setcookie(hi,true); 

这是一个非常奇怪的错误,报告@



Apple Bug Reporter PID#13966978。


So my application is an iframe based ecommerce cart; cart session is stored on the accessing domain. When a user checks out the iframe deploys a pop up login to our SAAS (which clears our domain for cross domain cookies). After the pop up login is authenticated the popup closes and the iframe refresh and loads the user's check out with their stored information (all done correctly). The cart session is past over to the iframe via http queries, so it is correctly hitting the server.

The problem area: My application deploys multiple cookies (cart session, referring site, etc), it seems that ONLY on the iPhone and iPad safari, the headers don't show multiple cookies being set. Only one is being set. Keep in mind that I have my php header declaring valid multiple cookies (or technically multiple headers allowed). Obviously the issue is on the client site mobile browsers, any one else have these issues?

Reported via Apple Bug Reporter PID #13966978.

解决方案

It turns out that the technique for safelisting a new domain via new popup window (set cookie with domain information + flagged as secure) didn't work.

You must first add a simple cookie to the very first line without any additional flags i.e.:

setcookie("hi","true");

This was a very weird bug and is reported @

Apple Bug Reporter PID #13966978.

这篇关于PHP多个cookie不工作在iPad / iPhone浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
PHP最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆