3

I want to define a new RequestContext when using CefSharp OffScreen to prevent multiple browser instances sharing the same information (e.g. cookies).

I can simply do that with CefSharp WinForms like that:

RequestContextSettings requestContextSettings = new RequestContextSettings();

requestContextSettings.PersistSessionCookies = false;
requestContextSettings.PersistUserPreferences = false;

WebBrowser.RequestContext = new RequestContext(requestContextSettings);

But the RequestContext is readonly in the offscreen variant. See http://cefsharp.github.io/api/57.0.0/html/P_CefSharp_OffScreen_ChromiumWebBrowser_RequestContext.htm Why is that so? And are there other ways to accomplish it?

Pang
  • 9,564
  • 146
  • 81
  • 122
niknot
  • 43
  • 5

0 Answers0