• Post Reply Bookmark Topic Watch Topic
  • New Topic

Application Session  RSS feed

 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
We are having a issue with session in our application, say when a user is logged in one tab, then the same user tries to open the application in different window or in differnet tab, intsead of login page it redirects to the home page of the application, here the session is shared :eek:
What could be the issue and can anyone help me in ressolving this issue.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sessions are maintained by cookies, and cookies are shared across tabs, and usually even other windows. So the session is also shared. This is no surprise -- it's what way things have always worked.
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
For tabs it is fine, but how about the session shared in new windows.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally tabs and new windows* are treated the same way.

Why is this important? It's not something that's generally considered a problem. It's highly unlikely that two people will simultaneously be sitting at the same computer, each trying to log into a different tab/window of the browser.

* Internet Explorer has ways (at least used to, not sure these days) where a new window could be opened that doesn't share cookies. That's generally considered a bug.
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not important as real, say in store(any Ecommerce application) there are chances that 2 peoples can use a same system on a shift base, where a person can leave the application unknowingly without logging out. which in turn there are chance for the user to share the same session unknowingly.

If it is a browser issue is there any way to block the same with use of JS?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can choose a short timeout period for the session if "shift work" is a concern.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!