开发者

How do I stop IE8 session sharing?

I'd like to stop IE8 from sharing my sessions in one of 开发者_运维知识库two ways (or both if possible):

  1. Through configuring the browser to always do this (so I can force my users to configure their browsers in this way).

  2. Through code in my web application.

Thanks.


Instead of storing data in the session directly, create a custom tab-level session upon demand and store everything there. When a new request for any page comes in, create a Dictionary<string, object> to use as the tab-level session and then store it in the session based on a unique key. Pass this unique key from page to page either in the viewstate or url.

However, you need to prevent users from opening links in a new tab (which will make them mad, so this really isn't a good thing to do anyways). To do that make sure all links are postbacks only.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜