5 Replies Latest reply: Dec 19, 2013 2:25 PM by Cdesai RSS

logout issue

DMohan87 Newbie
Currently Being Moderated

Open two browsers sessions and in one log into the site and close this browser. in the other open session, go to the same site. The user is already logged in. If both browsers are closed and a new browser is opened, this issue doesn't occur. How to fix this issue?

i.e how to clear the user's log as soon as he closes the browser?

  • 1. Re: logout issue
    Gautam Singh Journeyer
    Currently Being Moderated

    You cannot fix this issue as it depends on how browsers handle cookie. By default all new browsers share cookies across multiple browser window.

    Your only option, though is a tough one, is to switch to URL rewriting for session tracking.

     

    In IE a way to workaround this is to use "New Session" option from file menu. Other browsers you can use private window or incognito mode to achieve the same result.

  • 2. Re: logout issue
    Nitin Dubey Pro
    Currently Being Moderated

    Profile is session scoped component.

    So across same browser, multiple windows/tabs share same session,So We are logged in/out in one window/tab, We will get logged in/out across all windows/tabs.

     

    But Do different browsers share sessions?Please Clarify the doubt.

     

    Thanks,

    Nitin.

  • 3. Re: logout issue
    Gautam Singh Journeyer
    Currently Being Moderated

    I am not sure if your question is for Mohan but just to clarify your doubt, different browsers do not share sessions. Here different browsers mean different kind of browsers like Firefox, IE, Chrome, Safari, etc

  • 4. Re: logout issue
    Nitin Dubey Pro
    Currently Being Moderated

    Thanks Gautam for clarifying the doubt.

    The word different browser mentioned in the post was little confusing.

     

    Thanks,

    Nitin.

  • 5. Re: logout issue
    Cdesai Newbie
    Currently Being Moderated

    I am not sure what are your exact requirements, but if you would like to log user out irrespective of how many windows/tabs are open; this could be achieved with the Javascript. Capture 'Browser Close Button' event. On success delete the cookies responsible for storing log-in details. Not a great user experience - but again as I said it all depends on how strict are your requirements around this behavior.

     

    Regards,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points