Localstorage in ios13 resetting by itself

I've got a webapp running under Safari and uses Javascript localstorage to store persistent data.


The app icon is on the homescreen and runs full screen when tapped on.


With ios13 - localstorage has been resetting/clearing. The app itself is still cached.


Happened once to me but many users have complained.


Sometimes goes days without resetting and then reset. No way to replicate.


Any other reports of this?

No solution? I see local storage is resetting also on iOS 14.2 with Safari 14.0.1. Terrible bug, web app always downloads data from server.
Your problem may be linked to the 7 days cap on localStorage introduced in iOS/iPad 13.4

Here is a link to a blog post from webkit :
Full Third-Party Cookie Blocking and More

Did you try using service workers ? I wonder if service workers could prevent data loss in PWA


Hope I helped.


Localstorage in ios13 resetting by itself
 
 
Q