Sessions

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?

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).

Fred

Fred

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).

Let's say that I'm using Firefox and I open multiple instances of
Firefox ... so do all the instances of Firefox know about all the
cookies?

When, exactly, does a cookie with no expiration date disappear?

Anyway, is there a more in-depth explanation available anywhere online
that you can recommend?

Hi Ralph,

start here: http://guides.rubyonrails.org/action_controller_overview.html#session

Regards,
Nicolai

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).

Let's say that I'm using Firefox and I open multiple instances of
Firefox ... so do all the instances of Firefox know about all the
cookies?

Try it!

Fred