How to save cookies in CefSharp

NVO picture NVO · Feb 9, 2015 · Viewed 19.2k times · Source

I'm new to CefSharp. Last week i build my first little program with CefSharp in C#. It's a split screen program. In one split i loaded Tweetdeck. It works fine, but Tweetdeck doesn't store cookies. Every time i start the program, i must login. Is there a way to save the cookies?

var browser1 = new CefSharp.WinForms.ChromiumWebBrowser("https://tweetdeck.twitter.com/")
        {
            Dock = DockStyle.Fill,
        };
splitContainer1.Panel1.Controls.Add(browser1);

Answer

Czarek Tomczak picture Czarek Tomczak · Feb 9, 2015

Set CefSettings.CachePath directory. Settings are passed to Cef.Initialize().