Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How to remove a cookie by using Javascript?

Reply
Thread Tools

How to remove a cookie by using Javascript?

 
 
Phper
Guest
Posts: n/a
 
      11-26-2009
How to remove the cookie set by
javascript:void
(document.cookie=”PREF=ID=20b6e4c2f44943bb:U=4bf29 2d46faad806: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=4bf29 2d46faad806: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?
 
Reply With Quote
 
 
 
 
Matthias Reuter
Guest
Posts: n/a
 
      11-27-2009
Phper wrote:

> How to remove the cookie set by
> javascript:void
> (document.cookie=ā€¯PREF=ID=20b6e4c2f44943bb:U=4bf 292d46faad806: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=4bf 292d46faad806: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?


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
 
Reply With Quote
 
 
 
 
Zigurds
Guest
Posts: n/a
 
      11-30-2009
On Nov 26, 11:25*am, Phper <(E-Mail Removed)> wrote:
> How to remove the cookie set by
> javascript:void
> (document.cookie=”PREF=ID=20b6e4c2f44943bb:U=4bf29 2d46faad806: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=4bf29 2d46faad806: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?


 
Reply With Quote
 
Zigurds
Guest
Posts: n/a
 
      12-04-2009
On Nov 30, 10:57*pm, Zigurds <(E-Mail Removed)> wrote:
> On Nov 26, 11:25*am, Phper <(E-Mail Removed)> wrote:
>
>
>
> > How to remove the cookie set by
> > javascript:void
> > (document.cookie=”PREF=ID=20b6e4c2f44943bb:U=4bf29 2d46faad806: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=4bf29 2d46faad806: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?- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
JSP : how can directly get the value of a specified cookie namewithout using a loop FROM the header.cookie ? stunaz Java 2 12-24-2010 03:08 PM
How to set a cookie using Cookie Module tryg.olson@gmail.com Python 2 01-08-2009 02:39 PM
how to remove specified cookie in cookie jar? ken Python 1 04-01-2007 03:35 PM
Any downsides to cookie assignment inside custom class using HttpContext.Current? ASP.NET 2.0 cookie fix? ASP .Net 2 08-17-2005 06:43 AM



Advertisments