|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 130
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 130
|
Thanks for your quick reply.
Yes it would be very useful ;)
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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!
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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.aspxPass true to ignore cache. Thanks!
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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
|
|
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
|
|
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(); }
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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.aspxThanks!
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
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.aspxAnd make sure you pass true to the "deleteCache" parameter. Thanks!
|
|
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
|
|