在Iphone上的Codeigniter会话问题 [英] Issue with Codeigniter sessions on Iphone

查看:100
本文介绍了在Iphone上的Codeigniter会话问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的身份验证使用CI会话,在我检查过的所有地方都可以正常工作。我只是注意到,在iPhone上,我只能登录,如果我清除所有的Cookie和数据从iPhone(safari)浏览器。 Ipad很好没有这个问题。



Cookie是否已损坏?有任何人遇到这个。我想能够继续使用CI会话。我已经切换加密的cookie,因为有人建议。没有工作。



任何想法非常感激。

解决方案

看了看,似乎是因为在iphone缓存Ajax请求的safari。
与会话无关。
给我的ajax请求添加时间戳解决了我的问题。

  var timestamp = new Date()。getTime ; 

关闭我通过我的所有js文件寻找$ .ajax
:)


My authentication uses CI sessions and works fine everywhere that I have checked. I just noticed that on the iPhone I can only login if I clear all cookies and data from the iPhone(safari) browser. Ipad is fine doesn't have this issue.

Are the cookies being corrupted? has anyone come across this. I would like to be able to continue using CI sessions. I have toggled encrypting the cookie as someone suggested that. Didn't work.

Any thoughts much appreciated.

解决方案

Having looked around it appears that the cause is safari on the iphone caching Ajax requests. Nothing to do with sessions at all. Adding a timestamp to my ajax request solved my issue.

var timestamp = new Date().getTime();

Off I go through all my js files looking for $.ajax :)

这篇关于在Iphone上的Codeigniter会话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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