The *Agile Web Development with Rails* book has an explanation of
sessions that I am having trouble following.
Does anyone know of another good discussion of how Rails manages
sessions.
Specifically, in Firefox and and Internet Explorer ... is each browser
window a session? Is each invocation of the browser a session?
If I close a browser window ... can I restart the session?
Exactly what is a session and how is state information maintained across
browser requests?
A session is tied to a cookie (depending on your session store that
cookie either contains the session data or an identifier that allows
rails to retrieve the session from memcache/database/disk etc.) Your
questions above all boil down to what is the scope of a cookie and how
long does it last. Cookies can have expiry dates set long in the
future, but sessions are handled with cookies that are set to only
last until the browser quits (not the same as just closing a window).