Forum: Ruby on Rails Help with sessions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joe (Guest)
on 2007-05-09 02:57
(Received via mailing list)

In my rails app I'm using sessions to store information about the
users shopping cart.  Everything seems to be working fine but there is
one strange thing that I cannot figure out.  It seems that any request
(for /index.html for example) is causing a new cookie/session ID to be
created.  So if I clear my cookies and then visit my site's homepage I
then have a new cookie.  Is this normal behavior?  Would you expect
rails to generate a cookie even though no action is being called that
would create a new cookie?

Thanks in advance,
Brandon H. (Guest)
on 2007-05-09 23:53
(Received via mailing list)
Rails requires cookies to work at all... the cookie stores a hash
referencing the session which is what rails uses internally to provide
various services.  So yea... this is normal behavior.
This topic is locked and can not be replied to.