IOS16 Safari: LocalStorage is cleared after writing data of more than ~2.5MB.
After upgrading to IOS 16 we faced the problem of clearing data in localStorage.When we try to write data that size is more than ~2.5MB or all amounts of data more than ~2.5MB the LocalStorage is being cleared without any errors and warnings in Safari. I could not reproduce the problem in other browsers or platforms.
Step to reproduce:
Go to IOS 16 Safari
Open any website
try to write data more than ~2.5MB (the attached defineMaxSizeLs.js test script helps you to display the problem)
check your localStorage
Actual result:
your localStorage is empty
Expected result:
your localStorage should be filled your data or it should be thrown an exception if the quota is exceeded
Please consider the problem ASAP.
Thank you in advance!
2
1
4.5k