Page is a not externally linkable
- Hardware and OS Related Technologies
-- Website Technology Issues
---- logging into two site accounts from one pc and two browser instances?


Dijkgraaf - 3:39 am on Jul 5, 2012 (gmt 0)


So to answer the Original question. Yes to have two browsers be treated as two different sessions you would need to have each browser instance/tab keep a session key (that isn't stored in a cookie) that you pass back to the server with each request and persisted across different requests.

You can't store this session ID in the cookie as then it would be shared between the instances and you can only have one session logged in. If you tried to storing multiple cookies (one for each session) or multiple session keys in the cookie, you would run into the issue that the browser then would not know which cookie or session key belongs to it, unless you are storing the pointer to this key in another manner in each browser instance anyway (so it's easier just to keep the Session key in the first place).

A thread over here sums it up [velocityreviews.com...]
You have three ways:
1. Store session ID in cookie file
2. Store Session ID in the URL (for example,
example.com/HFFKSJ3F35R4W46HR435YFS/myFolder/myPage.aspx
3. Store Session ID in QueryString (for example,
example.com/myFolder/myPage.aspx?SID=HFFKSJ3F35R4W46HR435YFS

I would add a fourth option which would be a (hidden) form element containing the session key, but you can only use that if you are using POST's of the page to navigate to the next one.


Thread source:: http://www.webmasterworld.com/website_technology/4469688.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com