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.

Incognito mode

Post Reply
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Incognito mode

Post by dilfich »

HI!
Is it possible to create such a regime?
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Incognito mode

Post by salvadordf »

Yes. You only need to leave GlobalCEFApp.cache blank like this and it will use in memory cache :

Code: Select all

GlobalCEFApp.cache := '';
At this moment there's a known bug in the CEF3 binaries in "incognito mode". Some directories are created in that mode :
https://bitbucket.org/chromiumembedded/ ... nent-cache

If you use the "incognito mode" for too long in your application you will see that it uses a lot of RAM.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Incognito mode

Post by dilfich »

Incognito mode
TempContext := TCefRequestContextRef.New('', 'en', False, False, False, False);
Normal mode
TempContext := TCefRequestContextRef.New('patch_my_cache', 'en', False, False, False, False);
Am I right? So simply... :shock:
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Incognito mode

Post by salvadordf »

Yes, that's correct.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Incognito mode

Post by dilfich »

And what is cef_sandbox.lib and how can I use it?
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Incognito mode

Post by salvadordf »

If you want to have a sandboxed browser you would have to link that file into your application's EXE.
It's not easy to link "lib" files into Delphi apps and you would probably have to release your application under an open source license to avoid legal problems.

For more information about sandboxed browsers read this :
https://chromium.googlesource.com/chrom ... sandbox.md

For more information about other files in the CEF3 binaries read the README.txt file included in the package.
Post Reply