Open benoit74 opened 4 days ago
So far, only local storage works as expected across all tested readers
I'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:
docker run -it --rm -v $(pwd):/data -v $(pwd)/..:/output ghcr.io/openzim/zim-tools zimwriterfs -w index.html -I logo.png -l eng -t "Persistent storage tests" -d "Tests of cookies and local storage in a ZIM" -c "Mixed" -p "openZIM" -n "tests_en_persistent-storage" -L "Tests of cookies and local storage in a ZIM" /data /output/tests_en_persistent-storage_2024-07.zim
Resulting ZIM is available at https://tmp.kiwix.org/ci/persitent_storage/tests_en_persistent-storage_2024-07.zim
Tested on a Mac M1, Mac OS Sonoma 14.5.
With 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.
⚠️ Session cookie value is kept but a bit too much, it is not dropped at application restart.
With 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.
With 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.
✅ 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.
⚠️ It is impossible to set cookie (we probably get an error, but I can't debug).
Tested 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.
⚠️ Session cookie value is kept but a bit too much, it is not dropped at application restart.
Tested 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.
⚠️ pwa fails to load the index.html
Tested 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.
⚠️ Session cookie value is kept but a bit too much, it is not dropped at application restart.
Tested 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.
So 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 ! ;-)
✅ Tested on linux Fedora, kiwix-desktop locally build
⚠️ Local storage works, value is NOT kept across browser restart.
⚠️ It is impossible to set cookie (we probably get an error, but I can't debug).
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.
https://github.com/openzim/ted/issues/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.