简体   繁体   English

iPhone离线webapp,如何处理数据存储?

[英]iphone offline webapp, how to handle storage of data?

I'm trying to build a simple iphone webapp. 我正在尝试构建一个简单的iPhone Webapp。 It's only purpose is to process a form, store that data in JSON, and display it on another page. 这样做的唯一目的是处理表单,将数据存储在JSON中,然后将其显示在另一页上。 My question is: how do I store this data offline, so that it is not cleared when I relaunch my webapp? 我的问题是:如何离线存储此数据,以便在重新启动Web应用程序时不会清除这些数据?

My goal is to visit my app in mobile safari, add it to my homescreen, and start using it. 我的目标是在移动浏览器中访问我的应用,将其添加到主屏幕,然后开始使用。

Use localstorage API of html5 or better use websql. 使用html5的localstorage API或更好地使用websql。 Both are persistent. 两者都是持久的。 If you want to create a native app from html5/js code use apache cordova otherwise no need. 如果要从html5 / js代码创建本机应用程序,请使用apache cordova,否则无需使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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