I use the WebDB specification in HTML5 to create a standalone database for persistent offline storage. However, I need a way to get the current database size from javascript.
The only thing I can think of is to iterate over everything in the database and add the size of all the objects. The only problem is that this only works for primitive values, so it will only work if I serialize all my javascript objects first (using JSON) and look like a hack.
Is there a better way to do this? I need exact numbers.
Thanks for any help
source
share