I'm seeing a few comments from people suggesting that localStorage on an iPad is unreliable. Can anyone confirm that they are happily using localStorage on an iPad? I understand that there is a 5Mb limit too - is that still the case?
Thanks
localStorage works on desktop but not mobile (iOS version 12.2)
In Safari, you can find Local Storage by first going to the Develop menu, then choosing Show Web Inspector, selecting the Storage tab and then selecting Local Storage from the side menu.
Nowadays, through the use of LocalStorage, we can store data on clients like browsers and mobile apps without communicating with a back-end application. In this article, we will discuss how developers can store data on the client with cookies and how LocalStorage improved that experience.
LocalStorage has no expiration time, Data in the LocalStorage persist till the user manually delete it. This is the only difference between LocalStorage and SessionStorage.
I've been working on a project that uses localStorage on an iPad. In my experience, the localStorage is perfectly stable. However, there are two things to consider:
Yes, the storage-limit is still 5Mb. Since characters are stored UTF16, only 2.5M characters can be stored in localStorage.
In contrast to other localStorage implementations, localStorage.setItem() doesn't delete any previous items with the same key before storing the new item. In other words: When overwriting an item, one should always call localStorage.removeItem() before calling localStorage.setItem(), or you'll quickly run out of space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With