Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to remove a cookie by using Javascript?

17 views
Skip to first unread message

Phper

unread,
Nov 26, 2009, 4:25:39 AM11/26/09
to
How to remove the cookie set by
javascript:void
(document.cookie=”PREF=ID=20b6e4c2f44943bb:U=4bf292d46faad806:TM=1249677602:LM=1257919388:S=odm0Ys-53ZueXfZG;path=/;
domain=.google.com”);

The following statement doesn't work.
javascript:void
(document.cookie=”PREF=ID=20b6e4c2f44943bb:U=4bf292d46faad806:TM=1249677602:LM=1257919388:S=odm0Ys-53ZueXfZG;expires=Thu,
01 Jan 1970 00:00:00 GMT;path=/; domain=.google.com”);
What's wrong with the code?

Matthias Reuter

unread,
Nov 27, 2009, 1:39:29 AM11/27/09
to
Phper wrote:

You cannot set cookies for other domains than the one your script runs on.
So if your script does not run somewhere on .google.com, the browser
ignores your request to set a cookie for that domain.

Matt

Message has been deleted
Message has been deleted
0 new messages