Session cookies are widely used for browser user identity verification. In a recent project test, we encountered a related problem. After two different IE8 windows and logging on as two different users, the previously logged-on user page will be refreshed to the second user information page after the second user login. However, it is good to test in IE6 browser and no similar problems are found.
I checked the session settings in the entire project and found no problems. Finally, the analysis showed that the session was shared by the browser, so I checked the difference between IE8 and IE7 on the Internet and found that the session management of IE8 has changed significantly compared with IE7. This is something web developers need to pay attention:
In IE7, the same window (ie process) shares a session.
In IE8, all open IE Windows (ie processes) share one session. Unless you open a new window through the menu File> new session, or use the command line parameter iexplore.exe-nomerge to open IE. In addition, when all IE windows are closed, the session ends.
The key to this issue is whether or not cookies are shared among different ie processes. Some cookies are completely shared, and some scopes can only be limited to a single process. Because the cookie stores your sessionid, which is used by the server to determine whether to generate a new session.
By default, session IDs stored in cookies are used as identification marks, whereas cookies are independent of each other in browsers. Therefore, no matter how many windows are opened in the same browser, there is only one session.
Solve the session Sharing Problem in IE 8 browser testing:
1. Add-nomerge to the target bar of the IE 8 shortcut, and then open ie, the same session will not be shared.
2. Use the command line parameter iexplore.exe-nomerge to open IE.