1

In IE10 how can I check how much space is left in indexed db api? I saw this page

http://demo.agektmr.com/storage/

but I think it says not supported. Does anyone know?

Thanks.

omega
  • 40,311
  • 81
  • 251
  • 474

1 Answers1

1

Not absolutely sure, but to the best of my knowledge there isn't any limit set for indexedDB, which means that if there is no limit you cannot work out how much more is left. (At least based on Mozilla Developers - https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API).

Now some other posts like this one suggest that IE10 is suffering of a 250MB limit, so you could try to work with this figure and create your own small script which calculates 250Mb - current usage for the space left, but this isn't a very precise method.

Community
  • 1
  • 1
Emil Borconi
  • 3,326
  • 2
  • 24
  • 40
  • In the browser settings, I can see its 10mb by default, and can be changed to max of 999mb. – omega May 25 '16 at 16:11
  • 999 will not work as mentioned here: http://stackoverflow.com/questions/14717739/storage-limit-for-indexeddb-on-ie10, and yes you can lower it so unfortunatelly there really isn't any way to work out how much is left of an undefined value. – Emil Borconi May 25 '16 at 16:15
  • Does that mean after 250, it will just silently stop saving the stuff, like it won't even call success or fail callbacks? – omega May 25 '16 at 16:28
  • Per spec, transactions would start failing with an "abort" event, and the error would be QuotaExceededError. But you'd need to test in IE to be sure it follows the spec there. tx.onabort = function() { console.log(tx.error.name + ': ' + tx.error.message); }; – Joshua Bell May 26 '16 at 16:18