How can one detect via the JavaScript IndexedDB API that the storage limit is reached? I envision that when trying to write data to the DB one can be notified that there's no more room?
Asked
Active
Viewed 1,454 times
2
-
Solution mentioned [here](http://stackoverflow.com/questions/10988569/what-are-the-storage-limits-for-the-indexed-db-on-googles-chrome-browser) should help you – Apr 05 '13 at 11:18
2 Answers
1
Chrome will put "QuotaExceededError" in event.target.error.name
for the error callback. I'm not sure if this is done by other browsers, though.

dumbmatter
- 9,351
- 7
- 41
- 80
-
I think that only gets filled in for the transaction's abort callback, not the error callback. Though I am not positive. – dgrogan Apr 08 '13 at 03:09
-
Either way, I guess it's through an error callback. That'll have to do I suppose, catch it like a general error. – aknuds1 Apr 15 '13 at 18:10
-1
Storage limits
There isn't any limit on a single database item's size. However there may be a limit on each IndexedDB database's size. This limit (and the way the user interface will assert it) may vary from one browser to another:
Firefox: no limit on the IndexedDB database's size. The user interface will just ask permission for storing blobs bigger than 50 MB. This size quota can be customized through the dom.indexedDB.warningQuota preference (which is defined in http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js).
Google Chrome: see https://developers.google.com/chrome...rage#temporary