Jump to content

session sharing between tabs


robcrozier

Recommended Posts

Hi all.  Not sure if this is a common question?  Can't find the answer i'm looking for in the forum so far however.

 

Basically, i need to make sure that my site's sessions are not being shared between tabs.  Can anyone suggest how this can be done, or has onyone accomplished this with a robust solution?

 

Cheers

 

Rob

Link to comment
https://forums.phpfreaks.com/topic/151372-session-sharing-between-tabs/
Share on other sites

Basically, i need to make sure that my site's sessions are not being shared between tabs.  Can anyone suggest how this can be done, or has onyone accomplished this with a robust solution?

I'd also be interested to know if anybody has found a way of doing this; but as far as I'm aware it isn't possible.

 

Its a bit dodgy but couldn't you give the tab an id and suffix the session variables within that tab with the id?

 

Bit crude and dirty but it could work.

That was the principle I was working on, which I couldn't get to work... I modified my login screen to test if a basic session already existed; and if so, I assigned an unique ID to the tab before redirecting through to the secondary page which checked if a session file (using the base session ID and the Tab ID) existed, creating one if necessary. The secondary page then allowed the user to select which of several applications they want to access, storing that detail in the new session file.... but I found that it was confusing the original session.

Could have been my code, but I didn't have the time to test it further.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.