Jump to content

Recommended Posts

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/184595-sessions-and-firefox/
Share on other sites

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!

Link to comment
https://forums.phpfreaks.com/topic/184595-sessions-and-firefox/#findComment-974488
Share on other sites

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!  ;)

Link to comment
https://forums.phpfreaks.com/topic/184595-sessions-and-firefox/#findComment-974493
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.