Jump to content

session problem in tabbed browsing


Chris Val Kef

Recommended Posts

Let's get it from the start!

I login as USER_A in my system. Everything is ok.

Then in the same window of ie7/ff2 i open a new tab and login as USER_B. Everything is ok for USER_B but when i go back to USER_A's tab i'm browshing like i'm USER_B!
And at the end when i logout one of them the other ones session is destroyed too.

hope you got the problem!

I'm using only session_start() and for logout session_destroy().
Can you tell how to do this right and working?
Link to comment
Share on other sites

in different windows of ie/ff  i don't have the problem.

if i got it right you are saying that one instance of the browser keeps one session, so when i open the second tab and login it overwrites the sessions. even if i don't got it right that is what happening... lol!

is there any " new session_start()" function ? could this solve the problem? i've tried myself the unique name, unique id etc but still got the problem
Link to comment
Share on other sites

Get and post arguments are tab-specific, so you can use those to differentiate tabs.. it's a hassle to add them everywhere though.  You could make a wrapper which generates links with a tab identifier added to each link.

But really, why would you want your users to have multiple accounts open in seperate tabs? :)
Link to comment
Share on other sites

You're not going to have two users logging in to your site through the same browser on the same PC.  If they do, they're just screwing around and it's no big deal.

#1 logs in and views welcome page
#2 logs in and views welcome page
#1 refreshes welcome page and now sees #2's welcome page

This is in no way a threat or security violation to your site since the two users are sitting right next to each other.

Get over it.
Link to comment
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.