Welcome Guest Search | Active Topics | Sign In | Register

How can I clean the WebBrowser cache and cookies? and how do I know if they were cleaned satisfactorily? Options
mateo
Posted: Wednesday, June 20, 2018 6:06:01 PM
Rank: Newbie
Groups: Member

Joined: 6/20/2018
Posts: 9
I'm trying to delete the cache in 2 ways I found in one of the forums:

1 - wc1.WebView.Reload (true);
2 - EO.Base.Runtime.Shutdown ();

I do not know if the cookies and the cache are being cleaned satisfactorily and if they are the correct methods to do it.

I'm waiting for your help
eo_support
Posted: Thursday, June 21, 2018 7:39:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

In order to delete everything, you must destroy all WebViews and then delete the cache folder.

To destroy all WebViews, you can call Engine.Stop. Do not call Runtime.Shutdown as you won't be able to create any WebView again until you restart your application. See here for more information about Engine object:

https://www.essentialobjects.com/doc/webbrowser/advanced/engine.aspx

After you stop the engine, you can delete cache folder:

https://www.essentialobjects.com/doc/eo.webengine.engine.cleanupcachefolders_overloads.aspx

Make sure you pass AllVersions to the policy argument.

If you only want to delete cookies, you can use the CookieManager interface:

https://www.essentialobjects.com/doc/eo.webengine.cookiemanager.aspx

This will delete cookie but not cache.

Hope this helps. Please feel free to let us know if you have any more question.

Thanks!
mateo
Posted: Thursday, June 21, 2018 9:27:00 AM
Rank: Newbie
Groups: Member

Joined: 6/20/2018
Posts: 9
Ok, thank you. I have a other question.

What argument must be passed in policy in cleanupcachefolders?
mateo
Posted: Thursday, June 21, 2018 9:30:12 AM
Rank: Newbie
Groups: Member

Joined: 6/20/2018
Posts: 9
Excuse me, I have a new question. How can I know if I effectively delete all cookies from the page?

Than you, for your answers.
eo_support
Posted: Thursday, June 21, 2018 10:19:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

You can use this method to check what cookies are still in the cookie store:

https://www.essentialobjects.com/doc/eo.webengine.cookiemanager.getcookies.aspx

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.