Reputation: 681
I have a GWT application and i am setting some values in Cookies while login to the application. During logout, we are removing the cookies as given below. It is working fine and getting removed successfully in Internet Explorer 11. But , the cookie is not getting removed in firefox on logout. If we manually clear the cache in firefox then cookie gets deleted. Please help me to remove the cookies in firefox as well without clearing cache manually.
OnLogin : Cookies.setCookie("MYCOOKIE","abcdefghijklmnopqrstuvwxyz",new Date(),domain,"/",false);
OnLogout: Cookies.removeCookie("MYCOOKIE","/");
Upvotes: 0
Views: 99
Reputation: 64541
If a cookie is set with a domain, it must be removed with the same domain value.
I'm not sure GWT provides that API though… (but modern GWT apps should probably use sessionStorage or localStorage) instead of cookies, and custom headers (or payload data) in Ajax requests.
Upvotes: 1