I am trying to persist settings on a page through browser close/re-open. Currently the page has no concept of a user logging in. Every time I close the browser, re-open the browser, and load the page a new SessionID is created. I would like to load the old SessionID. Is this possible? I’d assume so since that’s the entire point of saving it, but after Googling for a bit I didn’t see anything on this.
I tried setting the timeout to a year, but even with a high timeout it still creates a new SessionID.
Thanks!
You could use persistent cookies. In ASP.NET when you emit a cookie you could set the
Expiresproperty to some date into the future. This will create a persistent cookie on the client browser and you will be able to fetch the value back even if the user closes/reopens the browser again.And because we live in 2011 and HTML5 is knocking on our doors (it has even entered inside some homes) it is worth looking into the HTML5 local storage.