IE和cakephp 1.3中的会话通过AJAX保存时无法正常工作 [英] Sessions in IE and cakephp 1.3 not working properly when saving via AJAX

查看:152
本文介绍了IE和cakephp 1.3中的会话通过AJAX保存时无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用cakephp 1.3构建应用程序。我有一个场景,用户必须从多个页面中选择多个项目。我使用cakephp Session来读/写会话。问题是,除了IE9之外,所有浏览器都可以正常工作。保存它们或从会话中删除它们并不一致。如果我使用IE开发人员工具(F12-> Cache)检查服务器的始终刷新,它可以正常工作......

I am building an app with cakephp 1.3. I have a scenario where the user must select multiple items from multiple pages. I use cakephp Session to read/write them to session. The problem is that this works fine in all browsers except IE9. It is not consistent in saving them or deleting them from session. If I check the always refresh from server using the IE developer tools (F12->Cache) it works fine...

有什么想法吗?

更新

通过调用服务器端脚本来保存到会话通过AJAX并传递项目的ID

The saving to session is hapening by calling a server side script via AJAX and passing the id of the item

推荐答案

检查/app/config/core.php中的Session.checkAgent设置

Check your Session.checkAgent setting in /app/config/core.php

尝试将其设置为false。 IE有一个烦人的习惯,就是根据它所做的请求类型改变它的浏览器代理字符串(例如,Ajax与常规请求不同)。

Try setting it to false. IE has an annoying habit of changing its browser agent string depending on the type of request it's making (Ajax is different to regular requests for instance).

这篇关于IE和cakephp 1.3中的会话通过AJAX保存时无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆