Delphi Chromium本地存储 [英] Delphi Chromium Local Storage
问题描述
我正在使用Delphi Chromium嵌入式DCEF3。如果我在本地运行应用程序,则可以将数据存储到本地存储中并进行检索。如果我关闭该应用程序并再次运行它,则数据将消失,因为Delphi Chromium Embedded似乎无法在会话之间保留数据。如果我在Chrome中运行该应用程序,则一切正常,我知道这是因为Delphi Chromium Embedded DCEF3使用文件来存储信息。您知道如何在会话之间保留本地存储数据吗?
I am using Delphi Chromium Embedded DCEF3. If I run my application locally I am able to store data into Local Storage and retrieve it. If I close the application and run it again, the data is gone because Delphi Chromium Embedded does not seem to retain the data between sessions. Everything works fine if I run the application in Chrome and I know that is because Delphi Chromium Embedded DCEF3 uses files to store information. Do you know how to retain local storage data between sessions?
非常感谢
推荐答案
在单元末尾添加以下内容:
Add the following at the end of your unit:
initialization
CefCache := 'e:\temp\cef';
CefCache
将在初始化时使用第7772行的 ceflib.pas
中的dcef。
CefCache
will be used at the initialisation of the dcef in ceflib.pas
on line 7772.
这篇关于Delphi Chromium本地存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!