Question

I am trying to avoid the problem whereby users of the site I am working on can open a new browser tab and end up sharing the same session.

I tried to use cookieless sesisons, but consensus is that cookieless sessions are not supported in MVC, but do work under certain conditions

Definitive not supported answer here: ASP.NET MVC and using cookieless sessions

This seems like a hack, especially as you cant use POST: MVC2 Cookieless Session Issue using POST

So how do you prevent multiple tabs being seen as the same session on the server please?

Was it helpful?

Solution

browser tabs share the same session id because the id comes from the browser. HTML5 SessionStorage, window.sessionStorage, addresses this limitation. That might not be viable depending on the backwards compatibility you need.

This goes into much more depth. How to differ sessions in browser-tabs?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top