HTML5 indexedDB和持久性生命周期 [英] HTML5 indexedDB and persistence lifetime

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

问题描述

我阅读了一些关于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


  • 用户关闭浏览器选项卡

  • 用户关闭浏览器
  • 会发生什么>
  • 用户重新启动系统

  • user close the browser tab
  • user closes the browser
  • user restarted the system

此外,
我通过基于cookie的身份验证维护用户会话。如果用户注销并再次重新登录,将会发生什么。有没有办法在注销前检索数据?

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

任何有关处理此问题的文档都表示赞赏。我浏览了规范,但读起来不是那么好。

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

感谢。

推荐答案

索引资料数据属于临时类型。因此,这些数据可以随时消除。

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).

这篇关于HTML5 indexedDB和持久性生命周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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