473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

JScript: Can't Programmatically Delete Cookies on Windows 2000 Professional

Dan
I persist the login info using cookies so that a user doesn't have to login
every time they come to our website, unless they previously logged out.
Everything works OK on W98 SE, and Windows XP Pro machines.

On a W2K machine, IE6.0.2800.1106 SP1, the following function won't delete
cookies, or deletes them but they're mysterioulsy re-created when the web
page is subsequently referenced. Therefore, a web user can't logout.

// ============================================
// remove login cookies
// ============================================
function KillLoginCookies ( )
{
Response.Cookies ( sCookieCustomerID ) = '';
Response.Cookies ( sCookieCustomerID ).Expires = '01/01/1980';
Response.Cookies ( sCookiePassword ) = '';
Response.Cookies ( sCookiePassword ).Expires = '01/01/1980';
}

What am I missing here?

Jul 19 '05 #1
2 3060
"Dan" <tr*****@gte.net> wrote in message
news:uZ**************@TK2MSFTNGP09.phx.gbl...
I persist the login info using cookies so that a user doesn't have to login every time they come to our website, unless they previously logged out.
Everything works OK on W98 SE, and Windows XP Pro machines.

On a W2K machine, IE6.0.2800.1106 SP1, the following function won't delete
cookies, or deletes them but they're mysterioulsy re-created when the web
page is subsequently referenced. Therefore, a web user can't logout.

// ============================================
// remove login cookies
// ============================================
function KillLoginCookies ( )
{
Response.Cookies ( sCookieCustomerID ) = '';
Response.Cookies ( sCookieCustomerID ).Expires = '01/01/1980';
Response.Cookies ( sCookiePassword ) = '';
Response.Cookies ( sCookiePassword ).Expires = '01/01/1980';
}

What am I missing here?


What is the code being used to create the cookies?
Jul 19 '05 #2
Dan
The cookies are created as follows:

Response.Cookies ( sCookieCustomerID ) = sLoginID;
Response.Cookies ( sCookiePassword ) = sPassword;

// get a date 1 year in the future
var d = new Date;
var sDate = d.getDate ( ) + '/' + (d.getMonth ( ) + 1) + '/' +
(d.getFullYear ( ) + 1);

Response.Cookies ( sCookieCustomerID ).Expires = sDate;
Response.Cookies ( sCookiePassword ).Expires = sDate;
"changed" <ch*****@changed.com> wrote in message
news:bj**********@geraldo.cc.utexas.edu...
"Dan" <tr*****@gte.net> wrote in message
news:uZ**************@TK2MSFTNGP09.phx.gbl...
I persist the login info using cookies so that a user doesn't have to

login
every time they come to our website, unless they previously logged out.
Everything works OK on W98 SE, and Windows XP Pro machines.

On a W2K machine, IE6.0.2800.1106 SP1, the following function won't delete cookies, or deletes them but they're mysterioulsy re-created when the web page is subsequently referenced. Therefore, a web user can't logout.

// ============================================
// remove login cookies
// ============================================
function KillLoginCookies ( )
{
Response.Cookies ( sCookieCustomerID ) = '';
Response.Cookies ( sCookieCustomerID ).Expires = '01/01/1980';
Response.Cookies ( sCookiePassword ) = '';
Response.Cookies ( sCookiePassword ).Expires = '01/01/1980';
}

What am I missing here?


What is the code being used to create the cookies?

Jul 19 '05 #3

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

Similar topics

7
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...
6
by: Ken Varn | last post by:
Sometimes when I try to close my managed C++ application, the following dialog displays in Win 2000 Pro: The title of the dialog is "Server Busy". The message is "This action cannot be completed...
3
by: Dan Sikorsky | last post by:
How can I get the recordset attributes for a table field in SQL Server 2000 to report the field updatable attribute correctly ... mine keeps saying the fields are not updatable? That is, (...
5
by: Alex | last post by:
I wrote an asp program to send email. I set SMTP as 127.0.0.1 and it worked well in Windows 2000 server but not in Windows 2000 Professional. What is different between server and professional. My...
2
by: Dave | last post by:
I have developed a VB.net application that transfers a SOAP wrapped message to another server securely(using SSL and sever/client certificates). When I run this app from a Windows 2000...
3
by: David | last post by:
I have a problem that I cannot delete components that are placed on a Tabbed page in Visual Basic.Net 2003. (OS = Windows 2000 Professional) The form uses a Tab Control with several pages. I have...
5
by: Joseph Barbaro | last post by:
I am trying to install DB2 Universal Database Enterprise Server Edition Version 8.1 (for Windows operating systems on 32-bit systems) on Windows 2000 Advanced Server that can be either standalone...
1
by: Tobias Zimmergren | last post by:
Hi. I've got the Access Runtime from the Microsoft Office 2000 Developer. I used to run it with Windows NT 4.0 and Office 2000. The operating system Windows NT4.0 is a Swedish version, and so...
6
by: DJones | last post by:
I'm using the following code in my .Net application (.Net v1.1, Windows 2000) to write Session Cookies. HttpContext.Current.Response.Cookies("cookieSession")("SessionID") = strSessionID ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.