持续寿命 [英] Persistence lifetime

查看:67
本文介绍了持续寿命的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了几篇有关IndexdDB的文章,但是找不到有关持久化数据生存期的详细信息.我计划将其用于数据操作会话,并在用户完成操作后上传.但是,如果发生以下情况,将会发生什么事?

I read few articles about IndexdDB, but couldn't find details about the lifetime of persisted data. I plan to use it for a session of data manipulation and upload once the user finishes. But what will happen if:

  • 用户关闭浏览器标签
  • 用户关闭浏览器
  • 用户重新启动系统

另外, 我通过基于cookie的身份验证来维护用户会话.如果用户注销并再次登录,将会发生什么?是否可以在注销之前检索数据?

Also, I maintain user session through cookie based authentication. What will happen if the user logs off and log back in again? Is there a way to retrieve the data before the logoff?

任何有关处理此问题的文档都将受到赞赏.我浏览了规范,但是阅读起来并不好.

Any documentation on handling this is appreciated. I skimmed through the spec, but it is not that good a read.

谢谢.

推荐答案

IndexedDB数据属于类型暂时的.因此可以随时清除这些数据.

IndexedDB data belong to a type of temporary. So these data can be wiped out at any time.

这些数据大小/寿命由非常新的配额管理API 进行管理.

These data size/lifetime are managed by very new Quota Management API.

将来,IndexedDB可能会使用持久性类型(也不可能,也不是一个好主意).

In the future, IndexedDB could possibly used persistance type (not likely and not good idea too).

这篇关于持续寿命的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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