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.
Localstorage lost
Localstorage lost
Hi,
I am wondering if there is any settings to preserve (ex: initialization CefCache := 'e:\temp\cef'; for DCEF3) localstorage.
After I restart the application all data from local storage is lost, however the data is preserved between multiple instances
until I close the application
Thank you in advance
PS: I use FMX
I am wondering if there is any settings to preserve (ex: initialization CefCache := 'e:\temp\cef'; for DCEF3) localstorage.
After I restart the application all data from local storage is lost, however the data is preserved between multiple instances
until I close the application
Thank you in advance
PS: I use FMX
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Localstorage lost
Hi,
Set the GlobalCEFApp.cache property to a writable directory to preserve the local storage when you close your application.
I would also recommend that you create all your browsers inside one application if you need them to share the same cache data. If you open several instances of your application and all of them have the same GlobalCEFApp.cache value you may have problems.
Set the GlobalCEFApp.cache property to a writable directory to preserve the local storage when you close your application.
I would also recommend that you create all your browsers inside one application if you need them to share the same cache data. If you open several instances of your application and all of them have the same GlobalCEFApp.cache value you may have problems.
Re: Localstorage lost
Thanks,
GlobalCEFApp.cache was the way.
Also I have another question.
When I use FMX, if the window is restored from the task bar, the window is blank and looks like in the picture.
If I resize the blank from any corner even 1px the browser content is restored.
how to restore also the browser window/component ?
GlobalCEFApp.cache was the way.
Also I have another question.
When I use FMX, if the window is restored from the task bar, the window is blank and looks like in the picture.
If I resize the blank from any corner even 1px the browser content is restored.

how to restore also the browser window/component ?
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Localstorage lost
Please, download the latest CEF4Delphi version from GitHub.
That issue was fixed recently and now the SimpleFMXBrowser demo works correctly when you restore it from the task bar.
If you still see that bug please make sure you uninstalled the previous CEF4Delphi version before installing the new one.
Delete all the old BPL and DCU files before installing the new CEF4Delphi version.
That issue was fixed recently and now the SimpleFMXBrowser demo works correctly when you restore it from the task bar.
If you still see that bug please make sure you uninstalled the previous CEF4Delphi version before installing the new one.
Delete all the old BPL and DCU files before installing the new CEF4Delphi version.
Re: Localstorage lost
Dear Salvador,
I have updated CEF4Delphi including CEF 79.1.10 but the problem persist with Simple FMX Browser and my application.
I have made the following steps:
1. Uninstall CEF4 from IDE and removed the folder (CEF4Delphi-master) - this location include also ALL DCU FILES
2. Remove from
C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\CEF4Delphi_FMX.bpl
C:\Users\Public\Documents\Embarcadero\Studio\20.0\DCP\ CEF4Delphi_FMX.bpi, CEF4Delphi_FMX.bpi, CEF4Delphi_FMX.lib
C:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 - all headers (148 items)
3. Create a new directory CEF4Delphi-master and installed CEF4
4. Build and run SimpleFMXBrowser.
TEST 1 (begin test after the app starts) - OK
1. Click "-" button to minimize the window.
2. Click on task bar icon to restore - works correctly
However if you will minimize the app by clicking on the "task bar icon"
TEST 2 (begin test after the app starts) - FAILED on the second cycle
1. Click task bar icon to minimize ( not "-" button from the app window )
2. Click task bar icon to restore
TEST 3 (begin test after the app starts)
1. Click task bar icon to minimize ( not "-" button from the app window )
2. Click task bar icon to restore (restore OK)
3. Click task bar icon to minimize
4. Click task bar icon to restore (restore FAILED)
5. Click "-" button to minimize the window (FAILED window)
6. Click task bar icon to restore (restore OK)
Thank you for your prompt reply
I have updated CEF4Delphi including CEF 79.1.10 but the problem persist with Simple FMX Browser and my application.
I have made the following steps:
1. Uninstall CEF4 from IDE and removed the folder (CEF4Delphi-master) - this location include also ALL DCU FILES
2. Remove from
C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\CEF4Delphi_FMX.bpl
C:\Users\Public\Documents\Embarcadero\Studio\20.0\DCP\ CEF4Delphi_FMX.bpi, CEF4Delphi_FMX.bpi, CEF4Delphi_FMX.lib
C:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 - all headers (148 items)
3. Create a new directory CEF4Delphi-master and installed CEF4
4. Build and run SimpleFMXBrowser.
TEST 1 (begin test after the app starts) - OK
1. Click "-" button to minimize the window.
2. Click on task bar icon to restore - works correctly
However if you will minimize the app by clicking on the "task bar icon"
TEST 2 (begin test after the app starts) - FAILED on the second cycle
1. Click task bar icon to minimize ( not "-" button from the app window )
2. Click task bar icon to restore
TEST 3 (begin test after the app starts)
1. Click task bar icon to minimize ( not "-" button from the app window )
2. Click task bar icon to restore (restore OK)
3. Click task bar icon to minimize
4. Click task bar icon to restore (restore FAILED)
5. Click "-" button to minimize the window (FAILED window)
6. Click task bar icon to restore (restore OK)
Thank you for your prompt reply
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Localstorage lost
Thanks for reporting this issue!
I just uploaded a new CEF4Delphi version that includes a fix for that bug in the FMX demos in normal mode : SimpleFMXBrowser and FMXToolBoxBrowser.
I had to replace the uFMXApplicationService unit with a custom WndProc procedure to handle the Windows messages correctly.
All the changes are here :
https://github.com/salvadordf/CEF4Delph ... 4a47e01707
Let me know if I missed something.
I just uploaded a new CEF4Delphi version that includes a fix for that bug in the FMX demos in normal mode : SimpleFMXBrowser and FMXToolBoxBrowser.
I had to replace the uFMXApplicationService unit with a custom WndProc procedure to handle the Windows messages correctly.
All the changes are here :
https://github.com/salvadordf/CEF4Delph ... 4a47e01707
Let me know if I missed something.

Re: Localstorage lost

Thanks again
Re: Localstorage lost
Hello,
Unfortunately today I have found that this bug (minimize/restore) is still present
if in the browser window you have a java script alert/prompt window open.
To reproduce the error please follow these steps:
1. Run the SimpleFMXBrowser and go to
2. https://www.w3schools.com/jsref/tryit.a ... sref_alert
3. click on the "Try it" button from the right (the alert box will show-up).
4. with the "Hello! I am an alert box!!" open (DO NOT CLOSE THE ALERT) try to minimize/restore
few times the browser window from the taskbar
Thank you.
Unfortunately today I have found that this bug (minimize/restore) is still present
if in the browser window you have a java script alert/prompt window open.
To reproduce the error please follow these steps:
1. Run the SimpleFMXBrowser and go to
2. https://www.w3schools.com/jsref/tryit.a ... sref_alert
3. click on the "Try it" button from the right (the alert box will show-up).
4. with the "Hello! I am an alert box!!" open (DO NOT CLOSE THE ALERT) try to minimize/restore
few times the browser window from the taskbar
Thank you.
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Localstorage lost
Thanks for reporting this!
I'll take a look as soon as I can.
I'll take a look as soon as I can.
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Localstorage lost
Please, download CEF4Delphi again.
The SimpleFMXBrowser and ToolboxBrowser demos should work fine when you restore them.
The SimpleFMXBrowser and ToolboxBrowser demos should work fine when you restore them.