how to store web application data on offline situation?Using android device or browser?

时间:2016-02-12 19:36:14

标签: c# android .net asp.net-mvc offline

we are working on web application .net mvc with online clients.

we have clients that may be offline , they are in an area without internet connectivity.

My question is , can we store their offline data with browser only, or we need other ways like using andriod application? what is benefits of using browser offline storage or device android application?

2 个答案:

答案 0 :(得分:1)

The answer is that, if you need to provide the capability of collecting their data offline, that solution will need to be separate from your web application. It will need to be self-contained so it can run on their device without any connectivity, and will need to provide the capability of uploading the offline data to your application once connectivity is restored. While they cannot connect to the internet, they will have no access to your web application which runs on your web server.

答案 1 :(得分:1)

You should move away from MVC and have 2 separate websites. 1 a web api which has access to your database and 2 a single page application that runs strictly on html + javascript. Modern browsers have sql storage within the browser. You can store all offline data in this database and when there is online connection you can transfer this data to your api.