开发者

Question about browser sessions

开发者 https://www.devze.com 2023-03-10 12:24 出处:网络
In a java web app, if I am browsing a site and then I open another IE 8 window* and go to the same site, is there a way to detect that the new request has come from another window from the same machin

In a java web app, if I am browsing a site and then I open another IE 8 window* and go to the same site, is there a way to detect that the new request has come from another window from the same machine.

Basicall开发者_Python百科y my requirement is to alert the user that they cannot open another window with the same site.

*In IE 8 all windows share the same session. Hence request.getsession() would always return the same ID across all the windows.


There is a great article about this exact question over at The Code Project. It's not 100% possible to detect this, but it is possible to work around it.

0

精彩评论

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