Question

I am developing a web application using HTML5 AppCache manifest for storing all the application artifacts (HTML pages, style sheets, scripts, etc.) and SQLite for storing forms data being submitted by the user.

The concern is that both of these repositories get deleted by deleting browser data - main focus is SQLite as the data being stored there is really crucial, as compared to AppCache. Is there a way to restrict deletion for my application, on desktop browsers as well as iPad?


P.S. Actually the app will be accessed in offline mode - and the data will be synchronized to the server later in online mode. I need to secure the data from deletion, stored during offline mode in SQLite - as there's a probability of deleting it accidently.

Was it helpful?

Solution

What you ask for is not possible – you cannot prevent your users from deleting your application's data, deleting your application itself, uninstalling the browser, reinstalling the operating system, or replacing the entire computer. And eventually, some of them will do this.

If the data is that crucial, you have to store a backup copy "in the cloud", i.e., on some server you control.

In practice, many web applications make a virtue of necessity and are explicitly designed so that users' data can be accessed from any random device.


Web applications just don't have permission to allocat storage resources permanently. If you want to be safe from accidental deletion, you should create a native app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top