Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBRowser - Clear cache & cookies Options
Fabien
Posted: Monday, July 28, 2014 8:17:28 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2014
Posts: 129
Hi,

What is the proper method to clear the cache and/or cookies EO.WebBrowser control?

I have not found a way to do that in your documentation, or even in the forum.

Thanks
eo_support
Posted: Monday, July 28, 2014 9:41:59 AM
Rank: Administration
Groups: Administration

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

There is no direct method to clear the Cache/Cookie rather than explicitly delete the cache/cookie folder. Also currently you must exit all WebViews in order to do so (otherwise the cookie files might be locked). This is one of the things we are considering to add though --- ideally a method such as ClearCache(beforeDate) would be useful.

Thanks!
Fabien
Posted: Monday, July 28, 2014 9:44:32 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2014
Posts: 129
Thanks for your quick reply.

Yes it would be very useful ;)
Aharon
Posted: Tuesday, August 19, 2014 6:55:57 AM
Rank: Member
Groups: Member

Joined: 7/29/2014
Posts: 10
Hi

Is there a way to clear cookies and cache for a specific visited domain ?

Is there a way to work in private mode (without cookies) and not cache content?
eo_support
Posted: Tuesday, August 19, 2014 10:24:01 AM
Rank: Administration
Groups: Administration

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

No. Unfortunately there is no way to do that right now. I believe it's possible for us to support private mode in future versions, but I am not aware of any plan to support clear cookies and cache for a specific domain since Chrome doesn't expose that feature either.

Thanks!



Aharon
Posted: Wednesday, August 27, 2014 3:18:02 AM
Rank: Member
Groups: Member

Joined: 7/29/2014
Posts: 10
Hi

Do you know when a function like ClearCache(beforeDate) will be added? We have several webviews which are loading URLs every X seconds independently, It will be difficult to synchronize them, close them, delete the cache folder and then reload them.

eo_support
Posted: Wednesday, August 27, 2014 8:54:52 AM
Rank: Administration
Groups: Administration

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

As for now we do not have an ETA on this feature yet. If you are refreshing the Url every X seconds, you can use this method:

http://www.essentialobjects.com/doc/6/eo.webbrowser.webview.reload_overload_1.aspx

Pass true to ignore cache.

Thanks!
Seby
Posted: Friday, September 26, 2014 10:51:10 PM
Rank: Newbie
Groups: Member

Joined: 9/26/2014
Posts: 4
Hi

I have a webview in a webcontrol, and i login into a webpage.
I want to clear cookies, because i need to login with another user.

I read here to "exit all webview"
i try :
mywebview.close
but i don't know how to create again into webform.

i try

mywebview= new webview
mywebcontrol= new webcontrol
mywebcontrol.webview=mywebview

but after that i can't saw in my form the webview when i load pages.

Please help me with a solution to clear all cookie.



eo_support
Posted: Saturday, September 27, 2014 10:47:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi Seby,

Basically you need to restart your application. The only way to clear cache and cookie is to clear all files in the cache and cookie folder. Because files might be locked when WebView is running, so you need to exit your application in order to do that.

Thanks
Seby
Posted: Saturday, September 27, 2014 2:36:00 PM
Rank: Newbie
Groups: Member

Joined: 9/26/2014
Posts: 4
If i dispose the webcontrol and webview, i can delete the cookies and cash folder.
Until here is ok and working, but tell me how can i add, from code a webcontrol that hosting a webview, in my existing form.

i try harder but every time i can't see the webpage in webcontrol.
I spend 2 day to try to use your control, and this issues is important for me. I can't use if without possibility to delete cookies and cash files.

thanks
Obi
Posted: Friday, October 17, 2014 4:48:24 PM
Rank: Newbie
Groups: Member

Joined: 10/14/2014
Posts: 4
Chrome stores cookie informations in sqlite database.
You may use following codes to clear all.

private void clearCookies()
{
SQLiteConnection liteConnection = new SQLiteConnection();
liteConnection.ConnectionString = "Data Source=" + cachePath + "\\Cookies; Version=3; New=True;";
liteConnection.Open();

SQLiteCommand liteCommand = new SQLiteCommand();
liteCommand.Connection = liteConnection;
liteCommand.CommandText = "delete from cookies";
liteCommand.ExecuteNonQuery();

liteConnection.Close();
}
joinyasin
Posted: Tuesday, June 21, 2016 3:01:25 PM
Rank: Member
Groups: Member

Joined: 3/17/2016
Posts: 12
where is located directory to delet cookies
EO.WebBrowser.Runtime.CachePath directory
from where i can delet all cookies?
eo_support
Posted: Tuesday, June 21, 2016 4:48:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
joinyasin wrote:
where is located directory to delet cookies
EO.WebBrowser.Runtime.CachePath directory
from where i can delet all cookies?


Hi,

The default directory is in your temp folder in the form of "eo.webbrowser.xxxxx", where the "xxxxx" part is a serial of numbers including the DLL version number. You can also use this function to delete them for you:

http://www.essentialobjects.com/doc/eo.webengine.engine.cleanupcachefolders.aspx

Thanks!
joinyasin
Posted: Wednesday, June 22, 2016 6:13:15 AM
Rank: Member
Groups: Member

Joined: 3/17/2016
Posts: 12
Thanks for quick reply
here is my other question that
if i create 2 engine suppose myengine_1 and myengine_2
is there any method that i create different directory for CachePath for both different engines?
eo_support
Posted: Wednesday, June 22, 2016 10:39:35 AM
Rank: Administration
Groups: Administration

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

If you do not set CachePath through EngineOption object, then two different path will be automatically created. If you choose to set CachePath yourself, then you must create two different path yourself, otherwise they will be overwritten each other's data and it will cause all kind of problems.

Thanks!
joinyasin
Posted: Tuesday, June 28, 2016 12:01:16 PM
Rank: Member
Groups: Member

Joined: 3/17/2016
Posts: 12
here a problem
i have a notice that if i make a application and then i save cookies to a cachePath folder and then i make a secont application then i copy first application's cachePath folder's file to second application's cachepath folder then all the data is readable so i have problem
because in my application i have lot of restrictions for my user if from my users will use these cookies with their own application then they can use my application's cookies so is there any option that we lock application cookies or encrypt for only my application
in simple way my question is that is there any option that can we protect our cookies that other can't use?
please help about this
eo_support
Posted: Tuesday, June 28, 2016 4:13:49 PM
Rank: Administration
Groups: Administration

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

No. The browser engine does not have any option for you to do that. Our engine is based on Chroimum and you will have the same problem with Chromium if user has physical access to the files.

Thanks!
joinyasin
Posted: Saturday, August 13, 2016 11:58:22 AM
Rank: Member
Groups: Member

Joined: 3/17/2016
Posts: 12
i search but i failed here my code and i want to delet cookies for only two engine

i have an application with Four Forms named Form1, Form2, Form3 and Form4
In Form2 i have webview named by webView_2 and similar in Form3 and 4 named webView_3 and webView_4

in Form1 i declare these
Public enginefrmStep2 As EO.WebEngine.Engine = EO.WebEngine.Engine.Create("MyEngine_2") ' for webView_2
Public enginefrmStep3 As EO.WebEngine.Engine = EO.WebEngine.Engine.Create("MyEngine_3") ' for webView_3
Public enginefrmStep4 As EO.WebEngine.Engine = EO.WebEngine.Engine.Create("MyEngine_4") ' for webView_4

now in Form1 load event
Private Sub frmStep1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

enginefrmStep2.Options.CachePath = Application.StartupPath & "\History_2"
enginefrmStep3.Options.CachePath = Application.StartupPath & "\History_3"
enginefrmStep4.Options.CachePath = Application.StartupPath & "\History_4"


' here i need complete code to delete cookies for enginefrmStep2 and enginefrmStep4
' i try to find method but failed please help
End Sub

now i explain my code so please help to to clean cookies folder by vb or c# code
eo_support
Posted: Saturday, August 13, 2016 1:27:23 PM
Rank: Administration
Groups: Administration

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

To clear the cache and cookie you need to stop the engine, which will destroy all the WebViews associated to that engine. Specifically, you can call this method:

http://www.essentialobjects.com/doc/eo.webengine.engine.stop.aspx

And make sure you pass true to the "deleteCache" parameter.

Thanks!
joinyasin
Posted: Saturday, August 13, 2016 1:35:54 PM
Rank: Member
Groups: Member

Joined: 3/17/2016
Posts: 12
Yes when i run application the default run form is Form1 and Form1 have not any webView so it's mean engine is not started yet
and please post complete code this will really help me
Thanks in advance


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.