简体   繁体   中英

Offline storage for mobile devices?

I am writing a mobile website that needs to store some data offline, and to sync that data when there is an internet connection. It is possible to use HTML5 Web SQL Databases, but there's a space limit of 5MB. I am wondering:

  1. Can I create multiple databases in HTML5 Web SQL Databases, so that the total size can exceed 5MB?
  2. If not, is it possible to store offline data into a local database app (if there is any) installed on smartphones?

Thanks.

Web browsers will eventually support file access using a sandbox. But for now you are limited to webStorage, Web SQL, or indexedDB along with a data limit per domain.

Here is information on webStorage , maybe you can put some data there.

Here is some information on web SQL. , but it looks like web SQL is being deprecated in favor of indexedDB. So you might want to re-consider your direction.

This would likely be your best bet - indexedDB . It is a form of no-SQL storage. Check the spec. for limits. SO won't let me post the link, but it is in caniuse as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM