473,800 Members | 2,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Jul 20 '05 #1
2 3177

"Phil Powell" <so*****@erols. com> schreef in bericht
news:JhO5b.1132 97$xf.17876@lak eread04...

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

Jul 20 '05 #2
Phil Powell wrote:
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 <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4063
by: Phil Powell | last post by:
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
7
2128
by: | last post by:
I think I may have a problem with the user of cookies in my centralized logon and registration system that I hoped could be consumed by all the sub-domains on my remote host IP. I built the application in the root of the IP and redirect the user back to his requested page after his Login. Just before this I set a permanent cookie. But, it appears when the user gets back to the page its GONE.
2
1706
by: Fabrice Labrousse | last post by:
Hello, after many deep searches on javascript and cookies, i still cannot have an answer for a incredible cookie problem ! here it is, i hope you'll be able to answer me : This is my function that put on a disk a cookie that has a 5 minutes duration
2
1387
by: Ian Sedwell | last post by:
Hi guys I've come across a problem with cookies. It seems that if one attempts to save several cookies in quick succession and then read them back again, you may attempt to read a cookie that has not yet been saved from the first operation. I assume that this is because JavaScript via the browser hands the job over to the OS and then merrily proceeds upon its way. As it happens, I solved the problem by rewriting my code to use one...
3
3857
by: Joey Powell | last post by:
This message was originally posted to the aspnet.security newsgroup, but no one there has ever heard of this before. That is why I am posting this message here, so that more people will see it... On my asp.net application, suddenly the forms authentication cookies for clients have quit expiring. This results in users being able to access the site from day to day without having to log in, even if their browers are closed and reopened...
7
423
by: Saber | last post by:
I want to prevent users from voting more than 1 time in a simple poll. I tried: Session.Timeout = 40 Dim objCookie As HttpCookie objCookie = New HttpCookie("before", "voted") If Session("before") = "" And Request.Cookies("before") Is Nothing Then Session("before") = "voted: true"
6
1594
by: Pete Davis | last post by:
I've never done anything with cookies. What I'm trying to do is very straight-forward, but for some reason, it just doesn't seem to want to work. I have a helper class with some static methods. Two are for setting and getting the name of the user to/from a cookie: public static string GetSiteUser(HttpRequest request) { HttpCookie userCookie = request.Cookies; if (null == userCookie || null == userCookie.Value) {
13
13929
by: yawnmoth | last post by:
Say I wrote an ajax script to send out HTTP requests via ajax. Any cookies that I have associated with that site will be sent along with this HTTP request. Is there a way to prevent this from happening? I tried the following to no avail: http.setRequestHeader('Cookie','');
7
10212
by: cmrchs | last post by:
Hi, In Windows Vista: where does asp.net write its cookies? I use HttpCookie objCookie = new HttpCookie("nameCookie"); in Win2000 (and later) they used to be in C:\Documents and Settings\Administrator\Cookies but not anymore
0
10274
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.