Esempio n. 1
0
        protected override void OnElementChanged(ElementChangedEventArgs <WebView> e)
        {
            base.OnElementChanged(e);

            Android.Webkit.WebView webView = Control;
            if (webView == null)
            {
                return;
            }

            if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop)
            {
                Android.Webkit.CookieManager.Instance.RemoveAllCookie();
            }
            else
            {
                Android.Webkit.CookieManager.Instance.RemoveAllCookies(this);
            }

            webView.ClearCache(true);
            webView.ClearHistory();
            webView.ClearFormData();
            webView.ClearMatches();
        }