Issue with Codeigniter sessions on Iphone

China☆狼群 提交于 2019-12-17 21:36:59

问题


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.


回答1:


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 :)



来源:https://stackoverflow.com/questions/12685171/issue-with-codeigniter-sessions-on-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!