Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit of localstorage on iPhone?

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?

like image 979
fesja Avatar asked Dec 17 '09 11:12

fesja


People also ask

Is there a limit to LocalStorage?

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.

Does LocalStorage work on Iphone?

localStorage works on desktop but not mobile (iOS version 12.2)

Does Safari allow LocalStorage?

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.

How do I clear local storage on my Iphone?

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.


2 Answers

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.

like image 57
SKFox Avatar answered Sep 20 '22 08:09

SKFox


"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

like image 39
Raptrex Avatar answered Sep 21 '22 08:09

Raptrex