使localStorage和/或IndexedDB数据脱机? [英] Making localStorage and/or IndexedDB data offline permenent?

查看:143
本文介绍了使localStorage和/或IndexedDB数据脱机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将localStorage和/或IndexedDB离线数据永久化?

Is it possible to make localStorage and/or IndexedDB offline data permanent?

我打算制作一个完全脱机的HTML5应用程序并希望数据永远不会被删除,除非用户故意这样做。

I am planning to make a completely offline HTML5 app and want the data to never get deleted, unless and otherwise the user knowingly does so.

即使应用程序关闭,系统关闭或运行CCleaner之类的东西,我也不希望删除数据。

I do not want the data to be deleted even after the app is closed, system is shutdown or something like CCleaner is run.

推荐答案

你所看到的是持久存储,如配额管理中所定义API 。目前没有一个浏览器实现它。

What you are looking is persistent storage as defined in Quota Management API. Currently none of the browser implemented it.

然而,即使是临时存储,IndexedDB数据也会在应用程序生命周期内持续存在。

However IndexedDB data, even thought temporary storage, are persist over application life cycle.

这篇关于使localStorage和/或IndexedDB数据脱机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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