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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
bhoult-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-09 19:52 UTC
Re: Help with sessions
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. On May 8, 5:56 pm, Joe <denver...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---