[英]Offline app : use HTML5 Filesystem API to store MySQL database
I need to build a PHP/MySQL app that allows offline access on iPads (for travelling salesmen often in deep country without internet connection). 我需要构建一个PHP / MySQL应用程序,以允许在iPad上进行脱机访问(适用于经常在深国而没有互联网连接的旅行推销员)。 I have to manage a daily (or on demand when the device is online) sync between the local data and my remote server.
我必须管理本地数据和远程服务器之间的每日(或按需在线状态下)同步。 I have a large database, which cannot fit in the 5M localStorage limitation.
我有一个大型数据库,无法满足5M localStorage的限制。 IndexedDB or Filesystem API are not available on Safari (according to http://caniuse.com/ ).
Safari上不提供IndexedDB或Filesystem API(根据http://caniuse.com/ )。
Is there other ways that would be appropriate to get it done? 还有其他合适的方法可以完成它吗?
Can't you use WebSQL? 您不能使用WebSQL吗? ( see question What is the maximum size of a Web SQL DB in iOS (Safari) on the iPad? How about LocalStorage? ).
(请参阅问题,在iPad上的iOS(Safari)中,Web SQL DB的最大大小是多少?LocalStorage怎么样? )
If you coded it for LocalStorage you could easily use that LocalStorage API to access WebSQL on iOS devices... 如果将其编码为LocalStorage,则可以轻松地使用该LocalStorage API来访问iOS设备上的WebSQL。
Perhaps a jump to PhoneGap would solve some of your problems? 也许跳转到PhoneGap可以解决您的一些问题?
Do you need to store ALL data from your database? 您是否需要存储数据库中的所有数据?
I have a library for doing Syncrhonization, it's LocalStorage at the moment but the next update will allow me to use nearly any storage mechanism as it only needs one index. 我有一个用于执行Syncrhonization的库,目前是LocalStorage,但是下一个更新将使我几乎可以使用任何存储机制,因为它只需要一个索引。 Purging data that is no longer required is on the list too... It's located at https://github.com/forbesmyester/SyncIt and you can even see a presentation courtesy of SkillsMatter / LondonAJAX .
清除不再需要的数据也在列表中……它位于https://github.com/forbesmyester/SyncIt ,您甚至可以看到由SkillsMatter / LondonAJAX提供的演示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.