[thelist] deleting cookies, front and back

Jeff jeff at members.evolt.org
Thu Jun 1 13:24:08 2000


teresa,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: <Teresa_Molina@hartehanks.com>
:
: Has anyone had problems/experience with deleting
: cookies with JS when they originally set programmatically
: (in this case, the cookie's being set with JavaScript)?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

no, it's just a matter of setting the date to something in the past.  then
when the browser is closed it takes care of getting rid of those cookies.
you can't actually delete a cookie right on the spot unfortunately.

what exactly are you doing now to delete the cookie?

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I suppose the real question is deeper than that... When
: you set a cookie using Perl or Java, etc., you send the cookie
: as a part of the header statement, as an extension of the HTTP
: protocol. But, when you set a cookie with JS, it's a property of
: the document object. I'm not exactly how to reconcile these two
: distinctions, where the overlap, if any, exists.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

actually, they overlap completely.  if you set all your cookies with
javascript, they're also all available to your server-side scripting
language of choice.  the same is true if they're set server-side.  every
last one of them is also a part of the document object in javascript.  when
it comes down to it, the browser doesn't care how they got there, only that
there are cookies available for that domain.

good luck,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff@members.evolt.org