Cookies set one time, I delete cookie, cookie is never set again!

P

Phil Powell

I am having this problem: My PHP script will set a cookie, it's there in my
/Cookies folder. I delete the cookie (I have to for testing purposes, the
PHP script I run behaves according to this cookie existing or not) and run
the script again. Everything runs fine, but the cookie is never set again.

Does anyone know why this happens? I am using Win2000 Professional with IE
6. Cookies are being set with PHP and Javascript.

Thanx
Phil
 
J

Janwillem Borleffs

Phil Powell said:
Does anyone know why this happens? I am using Win2000 Professional with IE
6. Cookies are being set with PHP and Javascript.

Try deleting the cookie with the expires argument set to a date in the past
and look what happens then.

JW
 
G

Grant Wagner

Phil said:
I am having this problem: My PHP script will set a cookie, it's there in my
/Cookies folder. I delete the cookie (I have to for testing purposes, the
PHP script I run behaves according to this cookie existing or not) and run
the script again. Everything runs fine, but the cookie is never set again.

Does anyone know why this happens? I am using Win2000 Professional with IE
6. Cookies are being set with PHP and Javascript.

Thanx
Phil

This isn't really a JavaScript question, and you haven't provided a lot of
details, but my first guess is that IE keeps a copy of cookies received during
a session (the time the app is running to the time it is shut down) in memory.
As a result, deleting the cookie from disk doesn't change IE's opinion that it
already has a copy of the cookie and does not need to write another to disk.

My first suggestion would be to close IE, delete the cookie, then start IE
again.

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top