如何从Windows Phone WebBrowser控件中删除所有Cookies [英] How to delete ALL Cookies from windows phone WebBrowser control

查看:75
本文介绍了如何从Windows Phone WebBrowser控件中删除所有Cookies的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用中,我使用WebBrowser控件。用户可以访问 http://mail.google.com ,然后无需退出google.com即可访问 http://twitter.com ,然后 http:/ /abcd.com 等。

In my app I use WebBrowser control. User can visit http://mail.google.com then without logging out from google.com he visits http://twitter.com then http://abcd.com etc.

现在,我的要求是重新启动WebBrowser控件并重新访问这些网站,并强制用户再次登录这些网站。

Now my requirement is to do the fresh start of the WebBrowser control and revisit those website and force the user to login again on those sites.

如何从WP7的Windows Phone WebBrowser控件中清除所有Cookies ?我尝试了一些可用的JavaScript示例。没事。

How can I clear ALL Cookies from windows phone WebBrowser control in WP7? I tried few JavaScript examples available in net. Nothing worked. Can you anybody help me on this?

推荐答案

该控件不是要给您对cookie等的细粒度控制,而是

the control is not to give you that fine grained control over cookies etc. it is meant to be use to display html data.

由于给定的webbrowser控件实例将在给定的会话中缓存数据,因此建议您要么通过重定向要么创建新实例用户访问该页面或进行onclick等

since a given instance of webbrowser control would cache data in given session, I'd suggest you either create new instance either by redirecting user to that page or doing so onclick etc

这篇关于如何从Windows Phone WebBrowser控件中删除所有Cookies的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆