Moving beyond localStorage
For everybody starting to use indexedDB I recommend to take a look at Dexie.js (http://dexie.org/) for a minimalistic wrapper which might save you from a lot of pain as working directly with indexedDB is no fun imho.