processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.31k stars 1.27k forks source link

Local Storage gets deleted on iOS and iPadOS after Browser Restart #3182

Open fl-ing opened 5 days ago

fl-ing commented 5 days ago

p5.js version

v1.9.5 // Web Editor: v2.13.4

What is your operating system?

iOS, iPadOS

Web browser and version

Chrome: 126.0.6478.54; Firefox 127.1 (42781); iPadOS 17.5.1

Actual Behavior

While using the p5.js web editor: When saving something in local storage using the storeItem([key], value) function, the local storage gets deleted on iOS and iPadOS after closing the browser. The type of browser does not matter. I've tried on Chrome, Firefox and Safari.

It should not be a problem with my privacy settings, because lokal storage on other Websites (like https://mdn.github.io/dom-examples/web-storage/ ) works fine, even after restarting the browser.

It also appears not to be a problem with my code, because the same code works fine on different browsers on Windows, Android AND macOS.

Expected Behavior

I would expect no different behaviour of persistent local storage on iOS and iPadOS.

Steps to reproduce

  1. access via p5.js web editor on iOS or iPadOS on any browser: https://editor.p5js.org/fl-ing/sketches/G-4fSKqjH
  2. run it and tap a few times to store the score in local storage
  3. restart the browser and run the scetch again

Probable Cause of the issue

After some research, I suspect that the issue arises due to the scetch being contained in an