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.

Cookies are not storing after closing the app

Post Reply
smliveinc
Posts: 1
Joined: Thu Mar 26, 2020 10:25 pm

Cookies are not storing after closing the app

Post by smliveinc »

My code in project source:

Code: Select all

GlobalCEFApp := TCefApplication.Create;
  GlobalCEFApp.Cache            := 'C:\0\cache';
  GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitialized;
if GlobalCEFApp.StartMainProcess then
  begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;

  End;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
And in form I using just;

Code: Select all

ChromiumWindow1.ChromiumBrowser.LoadURL('https://vk.com/');
Next I login in browser, closing application, opening again and see login has reset.
However, C:\0\cache is creating, has file with cookies and it probable (checked in hex-editor) has cookies for vk.com.
And same code works with CEF4Delphi 79 (last release on GitHub)! But not works with 80.0.4.0 and 80.0.8.0
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Cookies are not storing after closing the app

Post by salvadordf »

There's a known issue in the CEF libraries with the cookies.

CEF 80 deletes all the cookies when you navigate to any URL for the first time :
https://bitbucket.org/chromiumembedded/ ... omatically

Use the last CEF4Delphi release, which uses CEF 79.
Post Reply