CL Posted December 10, 2009 Share Posted December 10, 2009 Hey all. Out of my years of programming I've never really joined a coding forum before so if do something wrong don't hesitate to tell. I've seen my problem addressed several times on the internet, but there's never been an answer, or a workaround, so I'm hoping someone will help me out. I'm sort of new to PHP, but at the same time I've been working with it enough to know a few things, so I guess I'm sort of "medium" level. Anyway, here's my problem: I'm using sessions that expire on browser exit (default "0") - which works great until Firefox is concerned. If I save my tabs on exit then, long story short, the session is restored. This does not happen if I close the tab then close the browser, by the way. But obviously something I don't want since it's a huge security risk. Is there any work around for this? As I said it works great in other browsers ... and Firefox save for this particular issue. Quote Link to comment https://forums.phpfreaks.com/topic/184595-sessions-and-firefox/ Share on other sites More sharing options...
premiso Posted December 10, 2009 Share Posted December 10, 2009 The session saving is meant to be that way. To prevent this the only way I know how is having a session timeout after x amount of time. So you have a field in the DB that is "last activity" and if the time from last activity has been more then say 15-20 minutes of no activity you just make them re-authenticate to get back to what they were doing. This is heavily used on banking websites etc. And I believe that IE8 also has this "Save session" feature as well, but not 100% sure, but yea. Hope that helps. EDIT: Also welcome to the forums! Quote Link to comment https://forums.phpfreaks.com/topic/184595-sessions-and-firefox/#findComment-974488 Share on other sites More sharing options...
CL Posted December 10, 2009 Author Share Posted December 10, 2009 I had thought of something similar to the 15-20 minute solution, but I didn't know if that was the best "answer" to that particular "problem". To me it doesn't make sense to continue sessions in that manner ... but ah well, right? Thanks for responding so quickly, and thanks for the welcome too! Quote Link to comment https://forums.phpfreaks.com/topic/184595-sessions-and-firefox/#findComment-974493 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.