How to remove a domain cookie ?
-
Hi ! Thank you for reading this. Here is my problem. Iam creating a domain cookie so, other sites in my app can read values. How can i delete the cookie from the other site??? For example.. lets say my main site is www.abc.com, when user logs in, i create a domain level cookie like this Dim cookie1 As HttpCookie = New HttpCookie("Cookie",1234567) cookie1.Domain = ".abc.com" cookie1.expires=datetime.now.addminutes(30d) Response.Cookies.Add(cookie1) this creates my domain cookie. my other site(lets say test.abc.com) reads this cookie...now i want to delete the domain cookie from test.abc.com. How do i do it? All help and code example are much appreciated. Thanks RH
-
Hi ! Thank you for reading this. Here is my problem. Iam creating a domain cookie so, other sites in my app can read values. How can i delete the cookie from the other site??? For example.. lets say my main site is www.abc.com, when user logs in, i create a domain level cookie like this Dim cookie1 As HttpCookie = New HttpCookie("Cookie",1234567) cookie1.Domain = ".abc.com" cookie1.expires=datetime.now.addminutes(30d) Response.Cookies.Add(cookie1) this creates my domain cookie. my other site(lets say test.abc.com) reads this cookie...now i want to delete the domain cookie from test.abc.com. How do i do it? All help and code example are much appreciated. Thanks RH
set its "expires" property to a date in the past. If you want to do this across domains though, you may find that the user has set their browser security settings to prohibit you from doing this. Nothing you can do about that.
-
Hi ! Thank you for reading this. Here is my problem. Iam creating a domain cookie so, other sites in my app can read values. How can i delete the cookie from the other site??? For example.. lets say my main site is www.abc.com, when user logs in, i create a domain level cookie like this Dim cookie1 As HttpCookie = New HttpCookie("Cookie",1234567) cookie1.Domain = ".abc.com" cookie1.expires=datetime.now.addminutes(30d) Response.Cookies.Add(cookie1) this creates my domain cookie. my other site(lets say test.abc.com) reads this cookie...now i want to delete the domain cookie from test.abc.com. How do i do it? All help and code example are much appreciated. Thanks RH