• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session handling from different tabs of same browser

 
yogesh kalaskar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using IE 7 . When i login through same user account in different tabs of same browser , it gives me the same sassion id as the browser made in that way.
But is there any way to identify these 2 sessions or to forecefully give them different session id. (other than the evil means of cookie disabling).

Thanks,
Yogesh g k
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34073
335
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. They aren't really two sessions. They are the same session in two tabs. The browser has no way of knowing which requests come from which session.
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to realize that server-side sessions are an artificial add-on to HTTP. Since HTTP is stateless, the server needs to somehow recognize that a request belongs to a particular user it knows and has a session for. There are 2 ways to do this:

1) Cookies. The cleaner and more popular method, but it means that all browser tabs and windows by one user share the session - IMO this is in fact desirable, and I would be very annoyed at a site that made me login for each new tab, since I use tabs very intensively

2) URL rewriting. Any URL on the site has a session ID appended to it. This is more work (you have to do something everywhere you have a site-internal link), but makes it possible to have separate sessions in different tabs, though tabs opened through link will still share the session. It's also less unsafe, as it makes session hijacking easier, and it means the user always has to log in when he comes to your site.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what does that have to do with the poster's question?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic