# Dissabling cookies in webrick

**URL:** <https://www.ruby-forum.com/t/dissabling-cookies-in-webrick/135476>\
**Category:** Rails\
**Created:** [April 22, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/dissabling-cookies-in-webrick/135476 "2008-04-22T16:10:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [April 22, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/dissabling-cookies-in-webrick/135476/1 "2008-04-22T16:10:01Z")

</div>

Hi,

I’m using config.action\_controller.session\_store = :active\_record\_store  
to store sessions for my app.

I have a client that cannot parse requests when cookies are sent by  
server. I thought that by using the active\_record\_store the cookies are  
disabled.

But apparently they are not. How can I make that the server doesn’t send  
cookies? At least when requests are not for html?  
I use webrick for this.

I’m not good with sessions and cookies yet…

Thanks!

---

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [April 22, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/dissabling-cookies-in-webrick/135476/2 "2008-04-22T18:23:03Z")

</div>

Hi, no hints around?

Currently in the responses from the server I see cookie and session  
header and values.

What I want is that the server does NOT add cookie or session headers to  
requests of type programs/users.svg

I’ve tried the next in my app controller but I can still see cookie and  
session headers and values.

session :off, :if =\> lambda { |request|  
request.parameters[:format] &&  
request.parameters[:format] != ‘html’

I would appreciate any suggestions.

Thanks.
