# How do we DELETE this new Rails 2.0 "Cookie Store"?

**URL:** <https://www.ruby-forum.com/t/how-do-we-delete-this-new-rails-2-0-cookie-store/125409>\
**Category:** Rails\
**Created:** [January 8, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/how-do-we-delete-this-new-rails-2-0-cookie-store/125409 "2008-01-08T22:02:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 8, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/how-do-we-delete-this-new-rails-2-0-cookie-store/125409/1 "2008-01-08T22:02:46Z")

</div>

In the past, I would run this code to clear my session and cookie  
variables;  
def clear\_session  
session[:user\_id] = nil  
cookies[:user\_id] = nil  
cookies[:password\_hash] = nil  
end

I would then go into my \Docs & Settings\user\_name\cookies and clear  
out the cookie file.  
Now, in Rails 2.0 (using the new SECRET key) I can’t seem to LOCATE?  
what file this is being stored in so I can;

1. Clear it out (in code)
2. Delete it manually  
I expect this is a common question.  
Thank you,  
Kathleen

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 9, 2008, 2:53am UTC](https://www.ruby-forum.com/t/how-do-we-delete-this-new-rails-2-0-cookie-store/125409/2 "2008-01-09T02:53:42Z")

</div>

I assume you’re talking about the new cookie based sessions. If so  
that’s the point of them, there is no longer any files or database  
entries to worry about. The session store is on the client’s web  
browser in a cookie. No more maintenance of old session data is  
required.

This has a few limitations especially with size. I believe that  
cookies can be up to 4k bytes. So you must keep your session data  
small, which is what you should be doing anyway. The other reason to  
keep them small is that they get transmitted between the client and  
server each request. So again, make sure they are small (i.e. keep a  
few ids and maybe small bits of other information but that’s all).

On Jan 8, 4:02 pm, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
