Page 1 of 1

Change GlobalCEFApp.cache folder at runtime after GlobalCEFApp.StartMainProcess

Posted: Wed Aug 15, 2018 11:54 am
by EdsonAlves
There is the possibility of setting in rumtime after the GlobalCEFApp.StartMainProcess the GlobalCEFApp.cache folder, is that I need to access a page twice in separate tabs, but it identifies that I am already connected, the only way I see would be to set the GlobalCEFApp.cache folder in runtime.

Re: Change GlobalCEFApp.cache folder at runtime after GlobalCEFApp.StartMainProcess

Posted: Wed Aug 15, 2018 12:18 pm
by salvadordf
Hi,

You need to use a different request context for each browser before you call TChromium.CreateBrowser.

The MDIBrowser demo allows to do this if you set the "Create a new request context for new browsers" checkbox in the upper panel.

The request context is created in the TChildForm.FormShow procedure in uChildForm.pas. The first parameter in TCefRequestContextRef.New is the cache directory used for that browser.