Reputation: 13277
I've got a classic asp app that has links from one page that open another page in a tab, so there are two pages from the applications open in the browser.
How does session state stop/start/expire with two pages open like this? Same session state in the same application instance with two different pages/
Upvotes: 0
Views: 65
Reputation: 10493
The session object uses a cookie which holds a key, which is passed in the header of each page to determine which session on the server to use.
This cookie, is the same for each instance of a browser, so if you used a different browser, you could look at the same page and have two cookies, but if you used IE (for example), and just had another tab open, this would use the same session as the first tab, as it's in the same browser instance.
When you close the browser, the session on the server won't be used any more, and will be removed at some point, Typically 20 minutes, when the session expires.
When you first open the page, the initial session is created.
Upvotes: 1