是否使localStorage和/或IndexedDB数据永久脱机? [英] Making localStorage and/or IndexedDB data offline permanent?

查看:107
本文介绍了是否使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天全站免登陆