Cookies are usually stored in the cache directory and you need to set a cache directory to save the cookies.
Most of the demos have the same cache for all the browsers they might create and you can set the cache directory by adding this code line before the GlobalCEFApp.StartMainProcess call in the DPR file.
Code: Select all
GlobalCEFApp.cache := 'c:\MyCacheDirectory';
Code: Select all
TempContext := TCefRequestContextRef.New('c:\MyCacheDirectoryForThisChildForm', '', False, False, False, False)
If you need to store the cookies in a different directory than the cache you will need to add this to the DPR file :
Code: Select all
GlobalCEFApp.cookies := 'c:\MyCookiesDirectory';
Code: Select all
Chromium1.CreateBrowser(CEFWindowParent1, '', TempContext, 'c:\MyCookiesDirectoryForThisChildForm');