AdvWebBrowser

Hi, we use this in our delphi app along with the runtime library for Edge and all is good.

When we browse to a site when the appis freshly opened we always have to agree to cookies and terms and conditions etc.

Is there a way for the browser to store this like the normal Edge borswer does, ie you only do it once, not evertime you open the browser?

Each time the app is run and displays google maps for instance we have to agree to the terms again.

For the moment this is not yet possible out of the box.
You can however store all of the necessary cookies in a file and load them once the browser is initialized.
This can be done with the GetCookies method in combination with the OnGetCookies event. And the loading with the AddCookie method.

An example on using the cookies can be found in the AdvWebBrowser Demo folder.

I looked at the demo but it doesnt do it.

Google loads up and asks you to sign in or accept terms. We accept terms and then add a cookie.

When you run the app again it asks you to accept the terms again.

It doesnt work im afraid. Also how would the delphi app know that someone has clicked accept terms to be able to store the cookie?

Any other ideas?

I mentioned the demo to show you how to use all of the functionality available with the cookies.

It is not possible to dertermine when a cookie was set therefor you will need to choose a moment to manually retrieve the cookies with GetCookies and the OnGetCookies event.
Then you can manually save the cookies to a csv or other file.
And when you have the OnInitialized event you can manually load the saved file and add the cookies with the AddCookie method.

Another possibility might be to use our TMS FNC Maps, which doesn't have this store cookies request.

i looked at the demo again and it shows how to save the cookie but not how to add it back in.

So we could save all cookies from all browsers when the app is closed.

Then load them up when the App is created, can you send me some simple code to do this?