I'm wondering what's the limit of localstorage HTML 5 on iPhone? I read that it was like 5 Mb, but I'm surprised is so little. Any ideas?
LocalStorage should be avoided because it is synchronous and will block the main thread. It is limited to about 5MB and can contain only strings. LocalStorage is not accessible from web workers or service workers. Cookies have their uses, but should not be used for storage.
localStorage works on desktop but not mobile (iOS version 12.2)
Safari treats cookies and local storage as the same thing, so these steps work for both. Click the “Safari” menu and choose “Preferences”. Click the icon labeled “Privacy”. Make sure the option for “Block all cookies” is not checked.
To clear other stored information from Safari, tap Settings > Safari > Advanced > Website Data > Remove All Website Data." Or, if you want to delete it for a specific site, you can either slide the entry to left and delete it, or you can press edit in the top left and delete what you have to.
Mobile Safari on the iPhone and iPad will hold 5MB before throwing a QUOTA_EXCEEDED_ERR
when using localStorage. If you're using HTML5 SQL, the user will be prompted at 5MB intervals to increase the storage limit.
Desktop Safari v4 does not have a limit, afaik, on localStorage. However, Safari v5 limits the site to 5MB before throwing a QUOTA_EXCEEDED_ERR
, exhibiting the same behavior as the mobile version.
"The current default on iPhone is 5.0 MB. If your database grows beyond this limit, the user will automatically be asked to allow or deny the size increase. If he allows the increase, the database size limit will be upped to 10.MB"
Source: http://ofps.oreilly.com/titles/9780596805784/ch05_id35816678.html#ch05_id35933214
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