asp.net mvc session for a user can they open multiple tabs? multiple browsers?
I am a bit confused on how ASP.NET session works with my site, when a user opens up the site in multiple browsers, and/or multip开发者_如何学编程le tabs.
I see that after logging in with IE, i can open a new tab and not have to log in, and that if I log out of one tab, the other one will redirect to login after I try to do something.
I also notice that if I log in with IE, i still have to log in with FF.
My question - are session data shared between all of these sessions?
Are there any concerns I need to take into account here?
Thanks!!!
Sessions are cookie-based; so they will not be shared by different browsers (eg. Firefox vs IE), but they will be shared between instances of the same browser (eg. multiple tabs/windows of IE).
In your case, the login (authentication) information is stored in a cookie. Therefore, if you login using IE then the cookie is only for IE and you would have to login again with a different browser or when the cookie expires.
You have to log in with each browser so they can each create/write the login cookie. Once they have cookie you shouldn't have to login until it expires or you log out, which should include additional tabs.
精彩评论