achukrishnan
achukrishnan

Reputation: 875

How to Clear Web browser control cookies in Windows phone 7

i want to Clear Web browser control cookies before the new page load .Any way to clear cookies problematically in wp7

Upvotes: 3

Views: 1000

Answers (2)

Der_Meister
Der_Meister

Reputation: 5027

I tried to delete Facebook cookies, but it does not work. Solved the problem by using GetLogoutUrl() from Facebook C# SDK.

Upvotes: 0

pg90
pg90

Reputation: 433

For Windows phone 8, there is a simple way

webBroserInstance.ClearCookiesAsync();

In case of WP7, can get cookies using GetCookies method

List<Cookie> cookies = webBrowserInstance.GetCookies();

Loop through it and try discarding it

foreach (Cookie cookie in cookies)
{
        cookie.Discard = true;
        cookie.Expired = true;
}

Hope this works.

Upvotes: 3

Related Questions