Sharing Session cookies in IE7 and IE8 browsers

Source: Internet
Author: User

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.

 

In our environment, we often use different identities to access the same web server. When I used Internet Explorer 7/Internet Explorer 6, as long as I opened another Internet site on the Internet, Internet Explorer will jump out and ask the Internet access key every time, therefore, each Ie can log on with different identities.

IE8 has made some changes, so that multiple tabs or multiple ie window share a process to save resources and improve efficiency. But the side effect is that when you log on to a Web site and then open a tab or even another Internet site on IE, the same session will be shared. This means that both the other tab and the other IE will assume the identity of the previous login, and the session that is only accessible. In this case, it is equivalent to the ability to be split into multiple corners by a single person.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.