Help with sessions


#1

Hi,

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,
Joe


#2

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.