Hi,
Is there a way to use DCEF4 in the Chrome's 'Incognito window' mode ?
Thanks
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 ?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Incognito ?
Hi,
Use in-memory cache to be in incognito mode.
You only need to leave GlobalCEFApp.cache blank, which is the default value, to use in-memory cache and navigate in incognito mode.
Use in-memory cache to be in incognito mode.
You only need to leave GlobalCEFApp.cache blank, which is the default value, to use in-memory cache and navigate in incognito mode.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Incognito ?
Usually i set GlobalCEFApp.Cache with the same value of GlobalCEFApp.Cookies ; what is the actually difference between them ?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Incognito ?
The cache is a collection of databases and other files used by the browser to avoid downloading all the web page contents every time you navigate to that site.
Usually, the cookies are also stored inside the cache directory and they have small pieces of information like user IDs, session IDs, etc.
CEF4Delphi has the GlobalCEFApp.cache property where you can select the cache directory or leave it blank to use "in-memory" cache.
In case you need to store the cookies in a different directory than the cache then you can select it in the GlobalCEFApp.cookies property. If you leave GlobalCEFApp.cookies blank then CEF3 will store the cookies in the cache directory or "in-memory", depending on the GlobalCEFApp.cache value.
Usually, the cookies are also stored inside the cache directory and they have small pieces of information like user IDs, session IDs, etc.
CEF4Delphi has the GlobalCEFApp.cache property where you can select the cache directory or leave it blank to use "in-memory" cache.
In case you need to store the cookies in a different directory than the cache then you can select it in the GlobalCEFApp.cookies property. If you leave GlobalCEFApp.cookies blank then CEF3 will store the cookies in the cache directory or "in-memory", depending on the GlobalCEFApp.cache value.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Incognito ?
So if i set .Cookies but not .Cache, i still will remain logged in the sites i visited, but in incognito mode ?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Incognito ?
I just tested that combination and the browser is still logged in because the cookies are stored in the directory specified in GlobalCEFApp.cookies.
In incognito mode the browser should not store : browsing history, cookies and site data, or information entered in forms. The browser should delete all that information when the user closes the application and it shouldn't be available to other "normal mode" browsers open in the same application.
If an application sets GlobalCEFApp.cookies then those cookies are available the next time you run that app and that breaks the "incognito mode" definition.
You need to leave GlobalCEFApp.cache and GlobalCEFApp.cookies blank to be incognito mode... or create a new browser using a new request context with the cache and cookies parameters blank.
In incognito mode the browser should not store : browsing history, cookies and site data, or information entered in forms. The browser should delete all that information when the user closes the application and it shouldn't be available to other "normal mode" browsers open in the same application.
If an application sets GlobalCEFApp.cookies then those cookies are available the next time you run that app and that breaks the "incognito mode" definition.
You need to leave GlobalCEFApp.cache and GlobalCEFApp.cookies blank to be incognito mode... or create a new browser using a new request context with the cache and cookies parameters blank.