Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser - delete cookies in memory Options
jkelly
Posted: Tuesday, March 3, 2015 11:40:14 AM
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,
eo_support
Posted: Tuesday, March 3, 2015 10:11:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
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.aspx

Thanks!
jkelly
Posted: Friday, March 6, 2015 1:38:36 PM
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.
eo_support
Posted: Friday, March 6, 2015 2:10:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Unfortunately you won't be able to separate them in the current version. They are saved inside the same "database". Sorry about it!
jkelly
Posted: Saturday, March 7, 2015 11:55:48 AM
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?
eo_support
Posted: Monday, March 9, 2015 8:41:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
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.aspx

Thanks!
James
Posted: Tuesday, March 10, 2015 12:34:10 PM
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?
eo_support
Posted: Tuesday, March 10, 2015 12:36:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
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!
jkelly
Posted: Tuesday, March 10, 2015 5:46:52 PM
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.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.