# Cookie crazy

**URL:** <https://www.ruby-forum.com/t/cookie-crazy/149306>\
**Category:** Rails\
**Created:** [September 23, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/cookie-crazy/149306 "2008-09-23T13:11:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [September 23, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/cookie-crazy/149306/1 "2008-09-23T13:11:44Z")

</div>

We have a site that does not really use any cookies. However, after  
login a cookie is set by a 3rd party company. Therefore, we are  
[www.mycompany.com](http://www.mycompany.com) and they are [www.3rdpartycompany.com](http://www.3rdpartycompany.com). If the user  
pressed back and tries to login again the cookie is still stuck for  
[www.3rdpartycompany.com](http://www.3rdpartycompany.com) and they fail. Is there a way to use  
cookies.delete or something like that to get rid of cookies from a  
site that is not ours? We do not want to read the value just delete  
it.

---

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [September 23, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/cookie-crazy/149306/2 "2008-09-23T14:26:53Z")

</div>

On Sep 23, 2008, at 7:10 AM, David wrote:

> We have a site that does not really use any cookies. However, after  
> login a cookie is set by a 3rd party company. Therefore, we are  
> [www.mycompany.com](http://www.mycompany.com) and they are [www.3rdpartycompany.com](http://www.3rdpartycompany.com). If the user  
> pressed back and tries to login again the cookie is still stuck for  
> [www.3rdpartycompany.com](http://www.3rdpartycompany.com) and they fail. Is there a way to use  
> cookies.delete or something like that to get rid of cookies from a  
> site that is not ours? We do not want to read the value just delete  
> it.

Cookies from [3rdpartycompany.com](http://3rdpartycompany.com) will not be sent to [mycompany.com](http://mycompany.com).  
Unless you mean something like [3rdpartysubdomain.mycompany.com](http://3rdpartysubdomain.mycompany.com) which a  
cookie that is set for the [mycompany.com](http://mycompany.com) domain. Either you’re  
misinterpreting the situation or describing it incompletely/  
inaccurately here on the list.

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [September 23, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/cookie-crazy/149306/3 "2008-09-23T15:02:25Z")

</div>

What happens is this…you login and are sent to a 3rd party billing  
company. Therefore, you login at [www.mycompany.com](http://www.mycompany.com) which sends you to  
[www.billingcompany.com](http://www.billingcompany.com). At the [www.billingcompany.com](http://www.billingcompany.com) site they set a  
cookie…unfortunately, people keep pressing the back arrow… and  
then they go forward and of course the cookie is already there and  
flips out there system.

I would like to say everytime you hit [www.mycompany.com](http://www.mycompany.com) to delete the  
cookies for [www.billingcompany.com](http://www.billingcompany.com)… I know they are not available  
when my browser is set to [www.mycompany.com](http://www.mycompany.com) but they are available  
when [www.billingcompany.com](http://www.billingcompany.com) is open…so I want to clear them. Any  
ideas? This is not an easy one…I know that and it may not even be  
possible.
