Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
clearing all cookies,cache,etc at runtime
clearing all cookies,cache,etc at runtime
Hello! How can I clear all cookies, cache and everything while running my app? Deleting both from current memory and from folders also. Thanks!
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: clearing all cookies,cache,etc at runtime
Hi,
You can delete the cookies anytime you want using TChromium.DeleteCookies but CEF3 doesn't have a "clear cache" function to delete the cache while a CEF app is running.
There are some workarounds explained here :
https://www.briskbard.com/forum/viewtopic.php?t=248
You can delete the cookies anytime you want using TChromium.DeleteCookies but CEF3 doesn't have a "clear cache" function to delete the cache while a CEF app is running.
There are some workarounds explained here :
https://www.briskbard.com/forum/viewtopic.php?t=248
Re: clearing all cookies,cache,etc at runtime
Thank you.. How then all the real browsers can clear and delete all cache while running?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: clearing all cookies,cache,etc at runtime
That functionality is available inside Chromium but CEF3 doesn't expose it. CEF4Delphi uses CEF3's C API but it can't access Chromium functions directly.


Re: clearing all cookies,cache,etc at runtime
any way to access advanced functions?
also, any way to change canvas hash, webGL hash, etc related to fingerprints?
also, any way to change canvas hash, webGL hash, etc related to fingerprints?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: clearing all cookies,cache,etc at runtime
As far as I know, you can only fork and modify those open source projects to expose the hidden features.
Re: clearing all cookies,cache,etc at runtime
Sorry, I did not understand. Is it possible? At least with deep digging in cef4delphi code?salvadordf wrote: Thu May 24, 2018 6:21 am As far as I know, you can only fork and modify those open source projects to expose the hidden features.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: clearing all cookies,cache,etc at runtime
It's not possible to have those features if you only modify CEF4Delphi.snoop wrote: Sun May 27, 2018 12:57 pmSorry, I did not understand. Is it possible? At least with deep digging in cef4delphi code?salvadordf wrote: Thu May 24, 2018 6:21 am As far as I know, you can only fork and modify those open source projects to expose the hidden features.
CEF3 can only access what the Chromium project allows it to access and CEF4Delphi can only access what's defined in the CEF3's API.
You would need to modify CEF3's code first and possibly Chromium's code too.
After that, you would also need to modify CEF4Delphi to handle the new API calls that you have added to CEF3.
In short : depending on the features you want, you would need to dig deep in Chromium's code, then dig deep in CEF3's code and after that you would need to modify CEF4Delphi and your application.
Re: clearing all cookies,cache,etc at runtime
Hello salvadordf
Thanks again. I find it strange that some functions seems basic and impossible. I can understand that changing some hashes is advanced and can be hidden from regular users, but why its impossible to delete all cache at runtime for example? This is just ritoric question for chromium, not for you
But I have a new question for you
How can I catch and view result of request which is done while loading page?
I mean:
Im loading URL of one site. (using LoadURL function)
It also calls some POST request (I sniffed that). I need result of it.
Thanks again. I find it strange that some functions seems basic and impossible. I can understand that changing some hashes is advanced and can be hidden from regular users, but why its impossible to delete all cache at runtime for example? This is just ritoric question for chromium, not for you
But I have a new question for you
How can I catch and view result of request which is done while loading page?
I mean:
Im loading URL of one site. (using LoadURL function)
It also calls some POST request (I sniffed that). I need result of it.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: clearing all cookies,cache,etc at runtime
The response is available in the TChromium.OnResourceResponse and TChromium.OnResourceLoadComplete events.
If you need the contents, set a filter in the TChromium.OnGetResourceResponseFilter event. The ResponseFilterBrowser demo has all the code for this method.
If those calls are made from JavaScript then I'm not sure if CEF will trigger any of these events.
If you need the contents, set a filter in the TChromium.OnGetResourceResponseFilter event. The ResponseFilterBrowser demo has all the code for this method.
If those calls are made from JavaScript then I'm not sure if CEF will trigger any of these events.