Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Mobile PHP session
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"
Posted 29-Sep-12 3:14am
Comments
Sandeep Mewara at 29-Sep-12 8:54am
   
So, are you using session_destroy to clear out the session? Or expecting it to happen by itself?
kartiklalan at 29-Sep-12 12:13pm
   
I have used session_destroy() , still it is not happening : just in case of mobile browsers. Rest all things are going fine.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 5 Dec 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100