Advertisement

07.08.2008 at 02:43AM PDT, ID: 23545942 | Points: 125
[x]
Attachment Details

Can't delete cookies

Asked by seloh in Active Server Pages (ASP)

Tags: , ,

I'm having trouble with the logout of a site.
The site has a login for members, if you login two session and two cookies (+ exparation) are created, see login below. This works just fine.
It's been set up so that when the user leaves the site and comes back before the cookies expire he automatically logs in. If the user logs out and returns to the site he has to log in manually.
If I log out in internet explorer 7 and return to the site I automaticaly am logged in, thus the cookies still exist.
The logout script basically deletes all sessions and cookies, see below.

Am I doing something wrong or is this a bug in IE?

Thanks in advance!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
login:
userid is retrieved earlier on the page and assigned to a variable, username and random are retrieved right before.
 
session("userid") = userid
session("username") = rs("username")
 
response.cookies("CYG").expires = date + 21
response.cookies("CyG")("userid") = userid
response.cookies("CyG")("random") = rs("random")
 
logout:
session.abandon
 
for each cookie in response.cookies
   response.cookies(cookie) = "empty"
   response.cookies(cookie).expires = date - 1
next
[+][-]07.08.2008 at 03:05AM PDT, ID: 21952276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 03:17AM PDT, ID: 21952318

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628