in reply to CGI::Session --help

Usually session information is stored in cookies, which are shared among all browser windows/tabs.

So if you log in in one tab, and then refresh the other windows you should be logged in in all tabs. And if you close one of them, that doesn't affect the other windows.

And if you log out explictly in one tab, you delete the session information on the server, so the next time you refresh the page in any browser tab you are looged it.

That's the default behaviour, and everything else is rather hard and clumsy to implement.

And never forget that the current logged in / logged out status is only visible after you refresh the page.

Replies are listed 'Best First'.
Re^2: CGI::Session --help
by oxone (Friar) on Aug 28, 2007 at 11:26 UTC
    Couple of corrections:

    A logout doesn't delete the session info from the server unless the developer chooses to do so. It's more common to retain it so that the user can be greeted etc. on return

    Getting the session ID from the cookie is one of two default behaviours. The other is to look for a CGISESSID among the URL parameters. The latter method has disadvantages but would solve this requirement in that each 'tab' could then have its own session and login status.

Re^2: CGI::Session --help
by Anonymous Monk on Aug 28, 2007 at 11:17 UTC

    Thnks For The Inputs!

    Can Anybody Show Me A Way Out.??
    --

    Thnks

    Cherry

      Cookies are stored on a per host basis, so depending on how smart your browser is, you may be able to log into http://127.0.0.1 as one user and http://localhost. You should be able to have one session for each different name that points at your server. (you'll need to make sure your webserver maps these additional names to the correct vhost too)

      Wether your CGI scripts generate urls in a way that will function correctly under this situation is another question.

      I generally have 2 or 3 aliases to my hosts as part of the way the network is set up... one by name (nick), one by service (web, cvs etc), one for the literal IP (server22 for 192.168.5.22 when servers only live on 192.168.5)

      @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;