Opened 14 years ago

Closed 12 years ago

Last modified 10 years ago

#407 closed defect (fixed)

dojo.io.cookie.deteteCookie fails to delete domain cookies

Reported by: elricho66@… Owned by: anonymous
Priority: high Milestone: 1.0
Component: Core Version: 0.2
Keywords: Cc: alex
Blocked By: Blocking:

Description

Tested on FF 1.5, Windows XP

Test case : The first alert shows the cookie still hangs about. The second alert shows the cookie is removed.

dojo.io.cookie.setCookie("democookie","myvalue",90,"/",".starport.net",0); dojo.io.cookie.deleteCookie("democookie"); alert(dojo.io.cookie.getCookie("democookie")); dojo.io.cookie.setCookie("democookie",0,0,"/",".starport.net",0); alert(dojo.io.cookie.getCookie("democookie"));

Cheers Richard

Change History (8)

comment:1 Changed 14 years ago by alex

Milestone: 0.3release

comment:2 Changed 13 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

Double checked against the test HTML file in test/io/, seems to work just fine (calling dojo.io.cookie.getCookie("foo") and dojo.io.cookie.getCookie("obj") returns null).

comment:3 Changed 12 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

comment:4 in reply to:  2 Changed 12 years ago by guest

Resolution: invalid
Status: closedreopened

Replying to ttrenka:

Double checked against the test HTML file in test/io/, seems to work just fine (calling dojo.io.cookie.getCookie("foo") and dojo.io.cookie.getCookie("obj") returns null).


I'm still able to recreate this bug within my application in FireFox? 2.0.0.6. Internet Explorer 7 seems to remove the cookies properly though.

dojo.io.cookie.setCookie("TestCookie?", "CookiesTasteGood?", 7300, "/"); console.debug(dojo.io.cookie.getCookie("TestCookie?")); dojo.io.cookie.deleteCookie("TestCookie?"); console.debug(dojo.io.cookie.getCookie("TestCookie?"));

The above fix mentioned does work.

Just wanted to have someone look at this, so that it doesn't make its way in 0.9.

comment:5 Changed 12 years ago by tk

Unless you tested this in 0.9 (its already released...) reopening this ticket+the information you provided doesnt help much...

comment:6 in reply to:  5 Changed 12 years ago by guest

To explain a little more in-depth...

The moment you set a path or a domain in your cookie(s), DOJO is unable to remove the cookie properly in FireFox? (2.0 at least), but seems to remove the cookie in Internet Explorer 7.

comment:7 Changed 12 years ago by James Burke

Milestone: 1.0

Setting milestone to 1.0 so we don't lose it. We should confirm that the issue does not happen in the 0.9+ codebase.

comment:8 Changed 12 years ago by Adam Peller

Cc: alex added
Resolution: fixed
Status: reopenedclosed

the deleteCookie API is gone, so you basically use the second method to remove cookies now.

Note: See TracTickets for help on using tickets.