# Help with sessions

**URL:** <https://www.ruby-forum.com/t/help-with-sessions/103665>\
**Category:** Rails\
**Created:** [May 9, 2007, 12:57am UTC](https://www.ruby-forum.com/t/help-with-sessions/103665 "2007-05-09T00:57:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [May 9, 2007, 12:57am UTC](https://www.ruby-forum.com/t/help-with-sessions/103665/1 "2007-05-09T00:57:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [May 9, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/help-with-sessions/103665/2 "2007-05-09T21:53:47Z")

</div>

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.
