我有一个 CakePHP 应用程序(使用 cake 2.3),它使用 Session 组件在他/她第一次访问该站点时向用户显示一个启动页面,并且再也不会出现。这是控制器中的代码:
public function index() {
if (!$this->Session->check('splashShown')) {
$this->Session->write('splashShown', true);
$this->redirect(array('controller'=>'pages', 'action' => 'about'));
}
//other stuff in controller...
}
这在 IE、Firefox 和 Chrome 的桌面版本上完美运行。它也适用于 Chrome iOS,但不适用于 Safari iOS。在 Safari 中,Session->check() 函数总是返回 false。
有人知道 Safari iOS 上的会话发生了什么吗?