Deleting Indexed Cookie

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Deleting Indexed Cookie

    Hello,

    On one of my webpages, I use a cookie to automatically log a user in:

    Response.Cookie("USER")("USERNAME") = "Steve"
    Response.Cookie("USER")("PASSWORD")= "Password"

    This works, but when the user logs out, I want to delete this cookie. I used
    the following code:

    Response.Cookie("USER") = ""

    Although the Cookie collection in the response object now has the correct
    value (blank) for this cookie, IIS does not send the new cookie information
    to the browser. I have tried this code after the <HEAD> element but before
    the <BODY>, I've also tried it before any other code (HTML or ASP) on the
    page. I have even tried Response.Cookie("USERID") = "NOTHING" and that
    doesn't get sent to the browser. This is classic ASP, what am I doing wrong?
    This works fine with non-indexes cookies.

    Thanks

    Steve


    Steve Lutz Guest

  2. Similar Questions and Discussions

    1. HTTP::Cookie won't store sent cookie
      Hi all, My script requests http://foo.bar.com/ with code that looks a little like this: my $ua = LWP::UserAgent->new; my $cookie_jar =...
    2. #25629 [Opn->Bgs]: session cookie being set to deleted when deleting a session
      ID: 25629 Updated by: sniper@php.net Reported By: john at tarot dot com -Status: Open +Status: Bogus...
    3. 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,...
    4. [PHP] deleting one cookie is deleting both..why? (tiny scripts)
      --- Ryan A <ryan@jumac.com> wrote: If you are setting the cookie from bestwebhosters.com, the best way (my opinion) is to not specify the domain,...
    5. deleting one cookie is deleting both..why? (tiny scripts)
      Hi again, I am setting 2 cookies like so:(setCookie.php) <?php setcookie("name1","1","0","",".bestwebhosters.com");...
  3. #2

    Default Re: Deleting Indexed Cookie

    just dont give it a .EXPIRES and it will vanish when they clsoe the browser
    automatically.

    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    [url]http://www.Darkfalz.com[/url]
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------


    "Steve Lutz" <slutz@comcast.net> wrote in message
    news:O5gRaYSiDHA.3204@TK2MSFTNGP11.phx.gbl...
    > Hello,
    >
    > On one of my webpages, I use a cookie to automatically log a user in:
    >
    > Response.Cookie("USER")("USERNAME") = "Steve"
    > Response.Cookie("USER")("PASSWORD")= "Password"
    >
    > This works, but when the user logs out, I want to delete this cookie. I
    used
    > the following code:
    >
    > Response.Cookie("USER") = ""
    >
    > Although the Cookie collection in the response object now has the correct
    > value (blank) for this cookie, IIS does not send the new cookie
    information
    > to the browser. I have tried this code after the <HEAD> element but before
    > the <BODY>, I've also tried it before any other code (HTML or ASP) on the
    > page. I have even tried Response.Cookie("USERID") = "NOTHING" and that
    > doesn't get sent to the browser. This is classic ASP, what am I doing
    wrong?
    > This works fine with non-indexes cookies.
    >
    > Thanks
    >
    > Steve
    >
    >

    Curt_C [MVP] Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139