PWA on IOS and offline storage

前端 未结 2 978
清歌不尽
清歌不尽 2021-02-08 21:54

We looking to develop an \"App\" which would have the ability to record the details of a damaged car for assessors. The idea is that a small number of assessors would have compa

2条回答
  •  后悔当初
    2021-02-08 22:34

    My first thought would be that if you are only going to support iPads and indefinite offline storage is a requirement, you are probably best of with a native application. Keep in mind that for this kind of application you would need the Apple Enterprise Program, which is more expensive than the regular Developer Program.

    However, if you do want to use a PWA, your best bet for local storage would be the IndexedDB. As per the comment by skybondsor, browsers do indeed limit and possibly evict data after a while, according to ADM webdocs.

    But reading your question, I get the sense that you do not really need persistent local storage, but rather a method ensuring that your data will eventually end up on the server. You can accomplish this by exploiting the Background Sync methodology. This allows your application to delay the upload to when a stable internet connection is available.

提交回复
热议问题