移动浏览器上的会话管理 [英] session managment over mobile browsers

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

问题描述

我的网站是PHP,我使用session管理用户登录。桌面浏览器的一切都很顺利,但是当使用手机时,它无法正常工作。



问题是:理想情况下我们注销后会话应该通过使用到期session_destroy()。然后,如果我们尝试使用后退按钮转到上一页,理想情况下不应该显示页面,因为我们已经注销了。但是这里已经完成注销它仍然显示以前打开的包含登录信息的会话页面

I am having my website in PHP , I am managing user login using session. Everything goes fine with desktop browsers but when using mobile handsets it fails to work properly.

Problem ocuuring is : "After we do log out ideally the session should expire by using session_destroy() . And then if we try go to previous page using back button ideally should not show the page since we have been logged out. But here having being done logout it still shows previously opened session pages containing login information"

推荐答案

通过移动浏览器进行会话管理非常棘手。你将完成所有编程,但仍然会有不可预测的结果。因此使用最强大的解决方案。一个理想的解决方案是使用COOKIES而不是会话来解决你的问题。
Session management over mobile browsers is tricky. You will do all the programming right but still there would be unpredictable result. Thus use the most robust solution. An ideal Solution to this would be use COOKIES instead of session which would solve your problem.


这篇关于移动浏览器上的会话管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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