(04-22-2025, 10:08 PM)dbox Wrote:(04-22-2025, 08:30 PM)SMcNeill Wrote: Question with this local storage -- does it reset/clear when the browser clears it cache?Hrm, not sure what might be going on there. In general the local storage should not be deleted just because the system is restarted. The only exception to this that I am aware of is if you are using local storage in a private/incognito browser tab. The local storage data will be deleted when the last private browser tab is closed.
The reason I ask is because of the stupid iPad. It saves data to local storage, which lasts for a few days, but then disappears at a browser/OS update and cache reset. Even doing a full reboot/power off/on cycle can erase that local storage on an iPad.
I haven't noticed the issue on my Win 11 PC or laptop, but iPad sucks with it.
Here's where someone made a git report about the issue and what they think is going on with it: https://github.com/processing/p5.js-web-...ssues/3182
Quote:After some research, I suspect that the issue arises due to the sketch being contained in an <iframe> Tag (preview.p5js.org) and the local storage object being stored in the browser under that subdomain. The local storage being cleared after a browser reset is likely a WebKit security measure to prevent third party tracking ("Intelligent Tracking Prevention" https://webkit.org/blog/7675/intelligent...revention/). One solution could be to store and access the local storage object under the domain editor.p5js.org. But this exceeds the scope of my understanding.
Note 2: Safari and iPad erases *all* browser storage after seven days of it being unvisited. That's another of their security features they pushed on the public a while back to protect us all from ourselves. /sigh. Makes a real PITA with some of the html5 browser games. Take a break, start over...

