• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Application Session

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
For tabs it is fine, but how about the session shared in new windows.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can choose a short timeout period for the session if "shift work" is a concern.
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic