On Raspberry Pi Raspbian Chromium Kiosk-Mode, I am saving a cookie:
document.cookie = "currentImage=" + currentImage + ";expires=2038-01-19, 03:14:08 UTC; path=/"
Then after a while the power to the Pi is cut. When the system is restored, the cookie cannot be read. Is there a way to persist the cookie in JS?
It seems that you have misconfigured profile (Your profile that saves all data inside including the cookies). Check this blog post for bare config.
Also, make sure there is a directory with this path ~/.config/chromium
(This is the default directory for your profile data). And, you can also this option to set user data dir explicitly
chromium-browser --user-data-dir=DIR
--user-data-dir=DIR
Specifies the directory that user data (your "profile") is kept in. Defaults to ~/.config/chromium . Separate instances of Chromium must use separate user data directories; repeated invocations of chromium-browser will reuse an existing process for a given user data directory.
Personally, I didn't face this problem before but I tried to give you some insights and keys to the solution. Therefore, I highly recommend if you still face the problem to check this list for chromium different options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With