Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

Is it possible to maintain sessions of different logins on single browser?

  • Comment on (OT) Multipel sessions on single broser

Replies are listed 'Best First'.
Re: (OT) Multipel sessions on single broser
by Utilitarian (Vicar) on Feb 21, 2011 at 10:59 UTC
    If you are reliant on cookies to identify the session, then no as the session ID cookie would get reset to the last session.

    If you are depending on IP address and a POSTed token, then maybe (you should be allowing for multiple sessions originating behind the same NAT router).

    So what module are you using? How are you using it? and how is this a Perl question?

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
      FWIW, either Firefox or Chromatic recently made news about how they're going to make this a feature in the next version, perl-tab session cookies ...

      I, not OP
      /div>
Re: (OT) Multipel sessions on single broser
by JavaFan (Canon) on Feb 21, 2011 at 11:40 UTC
    Is it possible to maintain sessions of different logins on single browser?
    Yes. (Currently, I've a Perlmonks session, a gmail session, several work related sessions, sessions to a couple of blog sites, and probably some sessions I don't even realize).

    Do you have a Perl question?

      I believe the OP is talking about multiple logins to the the same website.

      One strategy I've seen confines logged-in users to a username subdomain, so once you're logged in, all your requests go to username.example.org, so if you have multiple accounts, there is no problem using the same browser to log into them simultaneously

      I, not OP

        A very interesting strategy.   Do you have particular pointers to sites that describe (and the pros & cons of...) how to do it?