Tuesday, September 22, 2009

IE8 Handles Browser Session Differently

IE8 confused me when I open two windows to access an application with two different user logins. The two windows unexpectedly share the same session.
I am supposing that the second window opened from the Start runs on a seperate process and has different session, but it is not.

Session id, by default, is tracked with cookies. Cookies are intended to keep user's favorite settings and stored in user's local file system.
They are identified only by url where to access to and has nothing to do with browser sessions, browser instances or processes.
In other words, browser sessions and processes share the same set of cookies.

Before IE8, when start a new process of IE, it creates a new session_id and a new cookie,
so user can work as different users or different sessions with two IE Process.
Differently in IE8, by default, new IE process shares the live session if it is existed, rather than create a new one.
This behavior is designed for more consisitency of handling sessions.

Eric Lawrence of IE Team has the following notes:

"We elected to make session
handling more consistent. Previously, some entry points would create
a new session (e.g. clicking a desktop icon) while others did not
(e.g. File > New Window)."


"Now in IE8, new sessions are created explicitly, by clicking File >
New Session, or by starting iexplore.exe with the -nomerge command
line parameter."

I tested with "New Session" menu and the commandline with "-nomerge" parameter, they worked for me.

Hope IE8 brings in a consistent solution for browser sessions, instead of producing more confusion.

No comments: