Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Deleting one cookie in a domain deletes all Options
Kurt Green
Posted: Friday, July 31, 2020 12:58:43 PM
Rank: Newbie
Groups: Member

Joined: 7/31/2020
Posts: 2
Hello, we recently added the ability to delete specific cookies in our code. We are running the latest build 2.0.2.19.
I am setting 2 cookies on our testing site one is persistent(cookie1), one is a session cookie(cookie2). When i call
CookieManager.DeleteCookies(domainName, cookie2), it deletes both cookies. I verify this by calling manager.GetCookies() after and it returns no cookies. in the cookiecollection.

Thanks
Kurt
eo_support
Posted: Monday, August 3, 2020 9:50:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,331
Hi,

Do they have the same name? DeleteCookies can only delete cookie by name. If the two has the same name, then both will be deleted.

Thanks!
Kurt Green
Posted: Monday, August 3, 2020 10:05:32 AM
Rank: Newbie
Groups: Member

Joined: 7/31/2020
Posts: 2
No. One is named "Cookie1", the other is named "Cookie2".

I call manager.GetCookies(). the result is as follows (with my domain name changed):
{Cookie1=Persistent Cookie; domain=mydomain.net; expires=Mon, 18-Dec-2023 12:00:00 GMT; path=/android/testing/nate
Cookie2=Session Cookie; domain=mydomain.net; path=/android/testing/nate
}

I then call manager.DeleteCookie("mydomain.net", "Cookie2");


I then call manager.GetCookies(); and
the result is empty. I verify this when i reload my test page and it shows no cookies.

Thanks
Kurt




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.