This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Deleting Cookie from Parent Window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Deleting Cookie from Parent Window" Watch "Deleting Cookie from Parent Window" New topic

Deleting Cookie from Parent Window

Ash Tengshe

Joined: Nov 25, 2003
Posts: 4
I am setting a cookie at a parent window level, then with a child window I am trying to delete the cookie.
By setting the expiration of the cookie to an old date, it appears to delete the cookie from the child, but not the parent.
Is there a way that I can delete the cookie at the parent browser level from a call at the child? I am using java to create the cookie and then I update it with the child window using javascript.
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
presuming you set the domain on the cookie to be correct and both pages share that domain you should be able to expire them in the way you described.

Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
wood burning stoves
subject: Deleting Cookie from Parent Window
It's not a secret anymore!