开发者

same session ID being generated across different IE windows

开发者 https://www.devze.com 2023-03-09 23:40 出处:网络
I have observed on IE 8 windows 7 machine, whenever I open my application on separate IE windows, the same session ID gets generated for each of them.

I have observed on IE 8 windows 7 machine, whenever I open my application on separate IE windows, the same session ID gets generated for each of them.

I was expecting different session ID's for different windows.

Does anyone开发者_运维技巧 knows why this is happening.

Code used to generate session ID

HttpSession session = request.getSession();


Things changed between IE7 and IE8 with regard to how new sessions are created. In IE8, choose File > New Session to create a new browser session.

You should read my article on this topic: http://blogs.msdn.com/b/ieinternals/archive/2010/04/05/understanding-browser-session-lifetime.aspx


Multiple Internet Explorer windows (and tabs) share the same process (assuming you opened the second window from within Internet Explorer), and therefore have the same cookies. Since your session ID is likely being stored in a cookie, this is why you get the same session ID for multiple windows.

Running separate Internet Explorer processes (or using IE plus another browser) should allow you to simulate multiple sessions.

0

精彩评论

暂无评论...
验证码 换一张
取 消