Page 1 of 1

clearBrowserData automatic

Posted: Sun Dec 08, 2024 9:40 am
by gorgor
Tell me how to automatically clear all data without user intervention (and without restarting the program)
If I try this way:
chrome://settings/clearBrowserData

, I still need to press the button
------
Chromium1.ClearDataForOrigin('*', TCefClearDataStorageTypes.cdstCacheStorage);
Chromium1.ClearCache;
Chromium1.DeleteCookies();
so it doesn't clean everything.
------
is there an example MDIBrowser for linux ?

Thanks

Re: clearBrowserData automatic

Posted: Mon Dec 09, 2024 3:53 pm
by salvadordf
Hi,

Try using Chromium1.ClearDataForOrigin('*', TCefClearDataStorageTypes.cdstAll); to clear all data asynchronously without restarting the browser.

Lazarus in Linux only supports MDI in Qt and not in Gtk:
https://forum.lazarus.freepascal.org/index.php/topic,41067.0.html

Use the TabbedBrowser2 demo for Linux instead.

Re: clearBrowserData automatic

Posted: Tue Dec 10, 2024 7:47 pm
by gorgor
salvadordf wrote: Mon Dec 09, 2024 3:53 pm Hi,

Try using Chromium1.ClearDataForOrigin('*', TCefClearDataStorageTypes.cdstAll); to clear all data asynchronously without restarting the browser.
did not help with clearing the form data. When filling out a form on the site, previously entered data starts popping up. Is it possible to somehow prohibit autofilling of forms?

Re: clearBrowserData automatic

Posted: Wed Dec 11, 2024 10:28 am
by salvadordf
Try using this :

Code: Select all

MyChromium.SetContentSetting(requesting_url, top_level_url, CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA, CEF_CONTENT_SETTING_VALUE_BLOCK);
Read the code comments for TChromiumCore.SetContentSetting for more details.

Re: clearBrowserData automatic

Posted: Thu Dec 12, 2024 6:26 am
by gorgor
Chromium1.SetContentSetting('*', '*', CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA , CEF_CONTENT_SETTING_VALUE_BLOCK);

I tried this, it didn't work. What am I doing wrong?

Re: clearBrowserData automatic

Posted: Thu Dec 12, 2024 3:20 pm
by salvadordf
Use URLs instead of asterisks.

Re: clearBrowserData automatic

Posted: Thu Dec 12, 2024 3:58 pm
by gorgor
and if needed for any sites?

Re: clearBrowserData automatic

Posted: Fri Dec 13, 2024 11:15 am
by salvadordf
Try calling that function in the TChromiumCore.OnBeforeBrowse event with the frame.url value