最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Creating a web app that can work offline, store data and then sync it to remote MySQL when online? - Stack Overflow

programmeradmin1浏览0评论

I am looking to create a web app written in PHP / MySQL. It will be used to collect data on houses by staff walking around a neighbourhood. There may be places where they have little to no cell signal, so I need a way to allow them to still view the web app when offline, as well as store the data they are submitting, to be inserted to the MySQL database once their phone has a signal / wi fi.

Is something like this even possible?

I am looking to create a web app written in PHP / MySQL. It will be used to collect data on houses by staff walking around a neighbourhood. There may be places where they have little to no cell signal, so I need a way to allow them to still view the web app when offline, as well as store the data they are submitting, to be inserted to the MySQL database once their phone has a signal / wi fi.

Is something like this even possible?

Share Improve this question edited Apr 13, 2018 at 6:12 ykaragol 6,2213 gold badges32 silver badges59 bronze badges asked Oct 2, 2017 at 20:09 user1110562user1110562 4231 gold badge11 silver badges32 bronze badges 2
  • Questions asking us to remend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. – Sammitch Commented Oct 2, 2017 at 20:12
  • Is something like this even possible? It certainly is. I use my own offline syncing / db. But for a kick start into offline databases & syncing. You could have a look at PouchDB / CouchDB bo.. – Keith Commented Oct 2, 2017 at 20:18
Add a ment  | 

1 Answer 1

Reset to default 5

Yes it is possible. Although there are many different alternatives, "Progressive Web Apps" (PWA) is one of the trending topic of today. They provide mobile app experience with responsive and mobile site. They also provide standalone mode.

You can use Cache API, IndexedDB API, Web Storage API... to store data.

You need Service Worker API to sync your application with database or to manage your application when the user is offline.

Google's documentation about PWAs may be a good point to start. Also you can dive into offline storage for pwa docs of Google.

This is a good blog to describe the features of PWAs.

UPDATE AT 2018 APRIL:

With IOS 11.3, Safari 11.1 was released with service worker support. Reference: the docs

Thanks @ChrisLove for the ment

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论