如何明确请求最终用户不删除本地存储数据? [英] How to Explicitly Request End User to Not Remove Local Storage Data?

查看:106
本文介绍了如何明确请求最终用户不删除本地存储数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用angularJS开发应用程序。我的应用程序需要在本地保存数据。所以,我正在使用HTML5本地存储。

I am developing application using angularJS. my application require to save data locally. So, I am using HTML5 local storage.

HTML5本地存储的问题是,当用户清除浏览数据时,所有数据都将丢失,我们需要避免这种情况。我意识到由于数据存储在用户计算机上,因此无法100%保护数据。

The issue with HTML5 local storage is that when user clears browsing data all the data is being lost and we need this to be avoided. I realize that since the data is stored on the users computer, there is no way to 100% secure the data.

基本上,有没有办法明确告诉浏览器这些数据是特殊的,当其他网站的数据被清除时不应该被清除?这必须是明确鼓励用户不要从该特定站点删除本地数据的方式。或者,我们需要合并一个本地数据库。哪个本地数据库是最佳选择?

Essentially, is there a way to explicitly tell the browser that this data is special and should not be cleared when data from other sites gets cleared? This would have to be a way that explicitly encourages the user not to delete the local data from this specific site. Or, alternatively, will we need to incorporate a local database. Which local database will be the best option?

推荐答案

您无法阻止用户从其Web浏览器中删除其数据(因为它是他们的网络浏览器)。

You can't prevent the user from deleting their data, from their web browser (because it is their web browser).

没有该规则不适用的本地数据库。

There are no local databases to which that rule does not apply.

如果您想防止意外删除数据:将其同步到服务器上的用户帐户。

If you want to protect against accidental deletion of data: Sync it to a user account on your server.

这篇关于如何明确请求最终用户不删除本地存储数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆