IE 7,IE 8等多标签浏览器会话问题 [英] IE 7, IE 8 etc multiple tab browser session problem

查看:272
本文介绍了IE 7,IE 8等多标签浏览器会话问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于会话对象,我对所有多页标签浏览器都有问题。我有一个要求,每当用户打开一个新的浏览器,我需要显示不同的值,所以我想在IE 6中使用Session,每个浏览器创建一个新的会话。但所有其他多个选项卡broswers IE 7和IE 8和FF共享会话(如果用户已经打开浏览器,并尝试打开不同的broswer)。有人可以告诉我,当用户打开一个新的浏览器窗口时,如何创建新的会话。我的应用程序基本上是在ASP.NET和服务器端我们有VB.NET。

I have a problem with all multpile tab browsers due to session object. I have a requirement that whenever user opens a new browser I need to show different values, so I thought of using Session as in IE 6 every browser creates a new session. But all other multiple tab broswers IE 7 and IE 8 and FF shares the session(If user has already open the browser and try to open different broswer). Can somebody tell me how can I create new session whenver user opens a new browser window. My application is basically in ASP.NET and server side we have VB.NET.

推荐答案

基于会话。您的网页指示浏览器在本地存储一个包含数据的小型文件,并且只要浏览器请求页面,此数据就会发送回网络服务器。此Cookie文件在浏览器实例中的所有标签之间共享。

This is because you are using cookie-based sessions. Your web page instructs the browser to store a tiny file with data locally and this data is sent back to the web server whenever your browser requests a page. This cookie file is shared between all tabs in your browser instance.

通常这是用户期望的,所以你应该有一个很好的理由,如果你想改变它,但如果需要的解决方案是使用查询字符串存储会话标识符。这是通过将 sessionState 元素的 cookieless 属性设置为值 UseUri 查看有关sessionState元素的文档

Normally this is what the user expects so you should have a really good reason if you want to change it, but if need to the solution is to use the query string to store the session identifier. This is configured in your web.config file by setting the cookieless attribute of the sessionState element to the value UseUri. See here for the documentation on the sessionState element.

这篇关于IE 7,IE 8等多标签浏览器会话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆