Just Can't Kill A Cookie...

Results 1 to 3 of 3

Thread: Just Can't Kill A Cookie...

  1. #1
    Rude Jake Guest

    Default Just Can't Kill A Cookie...

    I&#039;m using cookies to store some user authentication values, to validate and make sure the user is logged in.<BR><BR>ie: request.cookies("Username") = [the username]<BR><BR>Every page on the site checks to see if this cookie exists, and if not, kicks them to the login page.<BR><BR>ie: if request.cookies("Username") &#060;&#062; "" then response.redirect("/login.asp")<BR><BR>HOWEVER, if I try to set the username cookie to a null value<BR>ie: response.cookies("Username") = ""<BR><BR>This doesn&#039;t seem to delete the previous value, if I call the cookie value from another page, the username is still there...<BR>Any Idea on what&#039;s going on here?

  2. #2
    a Guest

    Default RE: Just Can't Kill A Cookie...

    Have you thought about using the SESSION object.

  3. #3
    Join Date
    Dec 1969

    Default RE: Just Can't Kill A Cookie...

    What you want to do is to kill the whole cookie, not just the value of the username key. <BR>Try <BR>request.cookies("Username").expires = date - 1<BR>which will effectively kill the cookie. <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts