I'm using the WebDB spec in HTML5 to create an offline database for persistent offline storage. However, I need a way to get the current size of the database from javascript.
The only thing I can think of is to loop through everything in the database, and add the size of all the objects. The only problem is this only works for primitive values, so this would only work if I first serialized all of my javascript objects (using JSON), and seems like a hack.
Is there any better way of doing it? I need accurate numbers.
Thanks for any help