Mobile site/app - capture data offline and push to live database

允我心安 提交于 2019-12-25 02:42:09

问题


I have an existing site which involves ongoing data capture from the site's member base. I want to provide a mobile friendly version of the site which can handle offline form submissions. I also want the mobile site not to be a native app and I would prefer to develop it as a web app which would work across iOS, Android etc - mainly due to not having the necessary development time to develop platform specific versions. But, is this realistic alongside my aim of handling offline form submission? Does anyone have any advice on this? The site is currently PHP/MySQL based.

Thanks for any pointers.


回答1:


You should look into HTML5 offline storage. There is a answer about this on SO

https://stackoverflow.com/questions/1194784/which-browsers-support-html5-offline-storage




回答2:


Use HTML5 offline app, and localStorage (see these in action on html5demos.com). To find out what browsers support this HTML5 functionality, go to http://www.quirksmode.org/webkit.html and look for appcache and localStorage.

You also need to figure out when to post the data to your server. So you'll also need some javascript code as part of your offline app that knows when the user is online, knows that there is data in localStorage and knows and when to post the data.

Take a look at Sencha Touch, it is a framework for mobile apps and may help you.



来源:https://stackoverflow.com/questions/8729624/mobile-site-app-capture-data-offline-and-push-to-live-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!