Xam.Plugin.Webview
Xam.Plugin.Webview copied to clipboard
Cookie and Cache
Hi :) I can't find a way to clear cookie and/or cache.
is there a way to do it programmatically?
Not in the abstraction currently! There is an event on each renderer called OnControlChanged which will allow you access to the native webview which you "should" be able to use to achieve this.
100% in my list of things to do though. Or you can do a PR ;) Will update this ticket to enhancement so I don't forget about it! Would there be a timescale you would need this by if you were to use this WebView?
I've to start a new project (about 10-15 FTE). I saw that this WebView has all I need (in order to simulate tab page, I'll duplicate the control). Clearing cookie is the only enhancement that it miss for my business.
I started to do some check about it.. from what I saw so far, there's no way to clear cookie/cache for a single instance.
On droid, the Android.Webkit.WebView control has the IsPrivateBrowsingEnabled property that should fit perfectly.
On UWP, I can't find (for now) something similar.
Yeah Windows has always been the problem child which prevents me from doing a lot of these kind of enhancements... I will have a look later when I am out of the office but I think you are right
Ok, I found it :)
On droid, just use IsPrivateBrowsingEnabled as I wrote above. On UPW, just call await Windows.UI.Xaml.Controls.WebView.ClearTemporaryWebDataAsync();
I suggest to create an async method to clear the cache/cookies with the above solutions.
I would like this as well. Any update on getting it added to the project?