Classic ASP cookies, multi-part kill 2 out of 4 keys only
I have a site (classic ASP) that uses cookies with 4 keys. I want to kill just some of the keys and save the rest. 

    ' first save the keys i want to keep
    var1 = Request.Cookies("cookieName")("key1")
    var2 = Request.Cookies("cookieName")("key2") 

    ' expire the cookie
    Response.Cookies("cookieName").Expires =date() -1

    ' recreate with the saved keys
    Response.Cookies("cookieName")("key1") = var1
    Response.Cookies("cookieName")("key2") = var2
    Response.Cookies("cookieName").Expires = date()+ 180

It doesn't work, the complete cookie with all 4 keys is still there.

The expire by itself works no problem, but if I include the code to recreate the cookie it is not killed. 

What's the best way to handle this? Similar concept works fine in asp.net 
Classic ASP cookies, multi-part kill 2 out of 4 keys only
===

I have a site (classic ASP) that uses cookies with 4 keys. I want to kill just some of the keys and save the rest. 

    ' first save the keys i want to keep
    var1 = Request.Cookies("cookieName")("key1")
    var2 = Request.Cookies("cookieName")("key2") 

    ' expire the cookie
    Response.Cookies("cookieName").Expires =date() -1

    ' recreate with the saved keys
    Response.Cookies("cookieName")("key1") = var1
    Response.Cookies("cookieName")("key2") = var2
    Response.Cookies("cookieName").Expires = date()+ 180

It doesn't work, the complete cookie with all 4 keys is still there.

The expire by itself works no problem, but if I include the code to recreate the cookie it is not killed. 

What's the best way to handle this? Similar concept works fine in asp.net 