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

Post Reply
snoop
Posts: 75
Joined: Mon Jul 10, 2017 12:06 pm

clearing all cookies,cache,etc at runtime

Post by snoop »

Hello! How can I clear all cookies, cache and everything while running my app? Deleting both from current memory and from folders also. Thanks!
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: clearing all cookies,cache,etc at runtime

Post by salvadordf »

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
snoop
Posts: 75
Joined: Mon Jul 10, 2017 12:06 pm

Re: clearing all cookies,cache,etc at runtime

Post by snoop »

Thank you.. How then all the real browsers can clear and delete all cache while running?
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: clearing all cookies,cache,etc at runtime

Post by salvadordf »

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.

Image
snoop
Posts: 75
Joined: Mon Jul 10, 2017 12:06 pm

Re: clearing all cookies,cache,etc at runtime

Post by snoop »

any way to access advanced functions?
also, any way to change canvas hash, webGL hash, etc related to fingerprints?
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: clearing all cookies,cache,etc at runtime

Post by salvadordf »

As far as I know, you can only fork and modify those open source projects to expose the hidden features.
snoop
Posts: 75
Joined: Mon Jul 10, 2017 12:06 pm

Re: clearing all cookies,cache,etc at runtime

Post by snoop »

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.
Sorry, I did not understand. Is it possible? At least with deep digging in cef4delphi code?
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: clearing all cookies,cache,etc at runtime

Post by salvadordf »

snoop wrote: Sun May 27, 2018 12:57 pm
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.
Sorry, I did not understand. Is it possible? At least with deep digging in cef4delphi code?
It's not possible to have those features if you only modify CEF4Delphi.

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.
snoop
Posts: 75
Joined: Mon Jul 10, 2017 12:06 pm

Re: clearing all cookies,cache,etc at runtime

Post by snoop »

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.
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: clearing all cookies,cache,etc at runtime

Post by salvadordf »

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.
Post Reply