When will IndexedDb be available as persistent storage?

1,632 views
Skip to first unread message

pshustad

unread,
Mar 21, 2013, 12:46:49 PM3/21/13
to chromiu...@chromium.org
Hi.
We are implementing an HTML5 offine-enabled application using IndexedDb as the Browser database. Currently, we are storing over 3 GB of data in different object stores (~ 1 GB in each store) . We do not really want to regard those data as temporary since our customers might be offline for a long time and need access to the system at all times. We have started getting problems with the temporary storage space getting exhausted and look forward to switch to persistent storage, using the Quota Management API.

https://developers.google.com/chrome/whitepapers/storage states that "The plan is to put all HTML5 offline storage APIs—including IndexedDB, Application Cache, Files System, and other APIs that might be specified—under the Quota Management API. You will be able to manage all storage allocation with it".

Does anyone know when this is planned to be implemented?

Regards,
  Per

David Grogan

unread,
Mar 21, 2013, 3:03:23 PM3/21/13
to pshustad, Chromium HTML5
AFAIK this is not planned for the near future.

Have you looked into using a chrome app that requests unlimited storage in the manifest? It might be a sufficient work around.

Regards,
  Per

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html...@chromium.org.
To post to this group, send email to chromiu...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.
 
 

pshustad

unread,
Mar 21, 2013, 5:16:43 PM3/21/13
to chromiu...@chromium.org, pshustad
Yes, I have looked into the chrome app solution and see this as a possible workaround. However, it requires more sophisticated users, as described here.
Anyway, thank you very much for your swift reply.

Shachar Zohar

unread,
Feb 2, 2014, 12:52:51 PM2/2/14
to chromiu...@chromium.org
Is there an issue for this?

Joshua Bell

unread,
Feb 3, 2014, 2:40:03 PM2/3/14
to Shachar Zohar, Chromium HTML5
There is now. :)



--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html...@chromium.org.
To post to this group, send email to chromiu...@chromium.org.

subhran...@globallogic.com

unread,
May 25, 2018, 6:19:27 PM5/25/18
to Chromium HTML5, shac...@gmail.com
Hi All, 

Storage Newbie here... Does the data in indexedDB gets wiped out when user -
1. closes the browser tab. ?
2. closes the browser ?
3. shuts down the PC ?

Regards,
Subhranshu Das

PhistucK

unread,
May 25, 2018, 6:23:37 PM5/25/18
to subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
I think it is wiped out when the disk space is relatively low.
I believe a persistent storage will never be wiped out.

PhistucK


Subhranshu Das

unread,
May 25, 2018, 11:21:30 PM5/25/18
to PhistucK, Chromium HTML5, Shachar Zohar
Thanks for the reply.

Kust to clarify my understanding, so in a hypothetical scenario where the disk space is nearly huge...as long as the USER doesn't explicitly wipe off data from the browser the data in indexedDB is going to live ? even in the 3 scenarios i mentioned - 

1. closes the browser tab. ?
2. closes the browser ?
3. shuts down the PC ?

And is the behavior cross browser (IE11+, Chrome, FF, Safari, mobile browsers as well)

Regards,
Subhranshu

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+unsubscribe@chromium.org.

PhistucK

unread,
May 26, 2018, 2:52:22 AM5/26/18
to subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
I only know about Chrome, but it makes sense to me that all of the browsers behave more or less the same.
Nothing is evacuated when the tab, browser or system is shut down. The whole point of having a storage mechanism is that it will persist (at least a bit).
(Even those old cookies can persist system shutdowns)

PhistucK


Joshua Bell

unread,
May 29, 2018, 5:06:31 PM5/29/18
to PhistucK, subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
There are some complications.
  • In Incognito mode the data is only retained until the end of the session (e.g. incognito window is closed)
  • There are options in settings (Privacy and security > Content settings > Cookies) that allow sites to be marked "Clear on exit', in which case the data for those sites is cleared when the browser is closed.
Most browsers have some sort of "private browsing" concept like Incognito, and presumably behave similarly. I'm unsure if they have "clear on exit" options.

Otherwise, just to be explicit about Chrome's behavior:
  • By default, storage is "best effort"; a site's data is retained until heuristics kick in. Currently in Chrome, the heuristics are to use at most a certain amount across all sites, and to retain a small amount of disk space free. When those "storage pressure" conditions kick in, site data is evicted on an LRU basis.
  • Sites can request the "persistent" permission. If granted, the site is immune to storage pressure-based. In Chrome, the permission is granted based on heuristics around site engagement, rather than explicitly prompting the user.
Additionally, regardless of permissions, if the user manually clears browsing data then the data is wiped.

Only Firefox also implements the persistent permission so far. All browsers have different heuristics about retention and eviction, but as PhistucK describes they have broadly similar behavior about retaining data across sessions by default.



PhistucK

unread,
May 30, 2018, 7:29:20 AM5/30/18
to Joshua Bell, subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
Does the "persistent" permission apply to IndexedDB? I seem to recall it did not apply to it (I might be confusing storage mechanisms here).
What does it apply to?

PhistucK

Joshua Bell

unread,
May 31, 2018, 12:54:51 PM5/31/18
to PhistucK, subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
Naming is unfortunately messy here.

Circa 2010 or so there was an earlier proposal for each origin to have two storage namespaces, "PERSISTENT" and "TEMPORARY". The only APIs that exposed this split were the Chrome-only webkitRequestFileSystem API and webkitStorageInfo/navigator.webkitXXXStorage APIs. Other APIs (WebSQL, Indexed DB, Cache API, ...) implicitly use the "TEMPORARY" namespace.

That was abandoned, and apart from those legacy, Chrome-only API surfaces and plumbing in the code, what was called "TEMPORARY" is now just referred to as the origin's default storage bucket in spec language, and behaves as I described earlier in the thread. By default the persistence is "best effort" but a permission can be granted elevating it to "persistent".

It's best to ignore the legacy "PERSISTENT" if you can, otherwise think of it as some strange parallel universe of storage.

PhistucK

unread,
May 31, 2018, 12:59:42 PM5/31/18
to Joshua Bell, subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
Does that mean that the "persistent" permission applies to all of the storage mechanisms in a permitted origin (WebSQL, Indexed DB, Cache API, local storage, cookies... Am I missing more mechanisms?) except the file system API?

PhistucK

Joshua Bell

unread,
May 31, 2018, 8:50:26 PM5/31/18
to PhistucK, subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
The "persistent" permission applies to all of those *and* the file system API's "TEMPORARY" namespace too. 

A quick attempt at a diagram here:


Re: more mechanisms: Service Worker storage (registrations, script cache, etc) is a storage API. Background Fetch storage is being treated this way too for the purposes of quota. Local Storage is handled differently for the purposes of quota, but has the same persistence guarantees as the other types.


PhistucK

unread,
Jun 1, 2018, 3:57:33 AM6/1/18
to Joshua Bell, subhran...@globallogic.com, Chromium HTML5, Shachar Zohar
Thank you fro the clarification!

PhistucK

Reply all
Reply to author
Forward
0 new messages