|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
"By default, EO.WebBrowser stores the cookies in memory. All cookies are discarded when your application closes."
My question is I want to click a custom button and delete all cookies in memory. The same event that happens when the application closes. How can i do this without actually closing the app?
Thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, You must destroying all WebViews in your application in order to delete all cookies. However you do not need to restart your app to do so. You can also call this method: http://www.essentialobjects.com/doc/6/eo.webbrowser.runtime.shutdown.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
This leads me to my second question. I want to only delete cookies, not cache. But I noticed that when I set Runtime.CachePath, I lose the functionality of cookies being deleted.
How can i continue to delete cookies when app closes or shutdown command even though i still want to set a custom CachePath?
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Unfortunately you won't be able to separate them in the current version. They are saved inside the same "database". Sorry about it!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
Ok, got it. so once i call the Shutdown method to destroy the webview, my plan is to then delete the cookie "database" file, and then recreate the webview. Can you provide code on how to recreate the webview in the same location that it was before at runtime?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, EO.WebBrowser does not have any out of box support for "recreating a WebView at the same location that it was before". So you have to do that yourself. For example, you can use a simple array of structures to remember each WebView's location, size and Url, then recreate each one of them later by code. To delete the "cookie database", you need to delete all files in the folder specified by this property (you will need to explicitly set it): http://www.essentialobjects.com/doc/6/eo.webbrowser.runtime.cachepath.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/11/2015 Posts: 122
|
I also need the ability to delete all in memory cookies. This has become a serious problem in our system recently, where we have an existing expectation to remove all cookies under certain conditions. Destroying all existing WebViews and restarting the entire browser system is not a solution. Other Chromium wrappers provide this functionality, such as Awesomium and Coherent UI by wrapping cookies and the cache into session objects. Is there any chance that EO will implement this functionality?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We do not have this feature right now. We do plan to add this in our next release but nothing is carved in stone yet. It is definitely on our list though.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
So just so I'm clear. Calling Shutdown method destroys the webview, but is the webcontrol still in place on the form? So would I need to do the following? Runtime.Shutdown(); WebView newWV = new WebView(); webControl1.WebView = newWV; webControl1.Location = ... webControl1.Size = ... newWV.Url = ... I tried the above but the new webview isn't showing. Thanks, eo_support wrote:Hi, EO.WebBrowser does not have any out of box support for "recreating a WebView at the same location that it was before". So you have to do that yourself. For example, you can use a simple array of structures to remember each WebView's location, size and Url, then recreate each one of them later by code. To delete the "cookie database", you need to delete all files in the folder specified by this property (you will need to explicitly set it): http://www.essentialobjects.com/doc/6/eo.webbrowser.runtime.cachepath.aspxThanks!
|
|