-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which persistent storage is available in ZIM readers? #39
Comments
TL;DRSo far, only local storage works as expected across all tested readers DetailsI've created a very basic test setup (HTML + JS), available at https://tmp.kiwix.org/ci/persitent_storage/persistent_storage_20240704.tar ZIM has been created with zimwriterfs:
Resulting ZIM is available at https://tmp.kiwix.org/ci/persitent_storage/tests_en_persistent-storage_2024-07.zim kiwix-serveTested on a Mac M1, Mac OS Sonoma 14.5. FirefoxWith Firefox 127.0.2 ✅ Local storage works as expected, value is kept across browser restart. ✅ Non-expiring cookie works as expected, value is kept across browser restart. SafariWith Safari 17.5 (19618.2.12.11.6) ✅ Cookies and local storage works as expected ; session cookie is dropped at browser restart ; non-expiring cookie and local storage values are kept across browser restart. ChromeWith Chrome 126.0.6478.127 ✅ Cookies and local storage works as expected ; session cookie is dropped at browser restart ; non-expiring cookie and local storage values are kept across browser restart. kiwix-apple✅ Tested on a Mac M1, Mac OS Sonoma 14.5 with kiwix-apple 3.4.0 (166) ✅ Local storage works as expected, value is kept across browser restart. kiwix-androidTested on a Fairphone 4 5G, with Android 13 and kiwix-android 3.10.0 ✅ Local storage works as expected, value is kept across browser restart. ✅ Non-expiring cookie works as expected, value is kept across browser restart. pwaTested with pwa.kiwix.org 3.3.6 on Firefox 127.0.2, Safari 17.5 (19618.2.12.11.6), Chrome 126.0.6478.127 on a Mac M1, Mac OS Sonoma 14.5. Kiwix-JSFirefoxTested with browser extension 4.0.1 on Firefox 127.0.2 on a Mac M1, Mac OS Sonoma 14. ✅ Local storage works as expected, value is kept across browser restart. ✅ Non-expiring cookie works as expected, value is kept across browser restart. ChromeTested with browser extension 4.0.1 on Chrome 126.0.6478.127 on a Mac M1, Mac OS Sonoma 14. ✅ Cookies and local storage works as expected ; session cookie is dropped at browser restart ; non-expiring cookie and local storage values are kept across browser restart. ConclusionSo far, only local storage works as expected across all readers |
Seems kiwix-desktop is missing |
Tester(s) on kiwix-desktop and/or iOS are welcomed ! ;-) |
kiwix-desktop (qt5)✅ Tested on linux Fedora, kiwix-desktop locally build |
Thank you! |
Question is answered:
Beware that local storage (just like cookies) might be shared across ZIM (e.g. with kiwix-serve), so the local storage key should be wisely chosen to avoid conflicts across ZIMs. But the opposite is true, on kiwix-apple, the local storage is isolated based on ZIM name apparently. So do not expect to share settings across ZIMs with local storage on all readers. |
Readers should provide a way for JS running inside the ZIM to persist some data, typically when navigating from page to page in a single session but ideally also between user sessions.
openzim/ted#208 has shown that it is a least unclear what readers are currently supporting and what they are supposed to support.
I propose to setup a ZIM with both local storage and cookies, and we should then check how this behaves in all readers. Based on that, we can decide what is reasonable to request as mandatory / optional.
The text was updated successfully, but these errors were encountered: