How to display indexDB data on initial page rendering
===

I have a Web page using JavaScript where I cache a large amount of data which I use to populate option tags of a select statement.  I have implemented this using localStorage but it is very very slow (it would be much faster regenerating/reloading from the server).  IndexDB looks promising as a solution.

All the examples I have been able to find have an indexDB database open, upgrade (configure/load) if necessary.  However, to display the indexDB data, the examples implement a button with an onclick function.  What I want is to display the indexDB data on the 1st rendering of the page (to load option tags of a select statement).

I have tried to do this but it seems because of the asynchronous callbacks make me unable to create a transaction on the initial rendering of the page hence unable to read the indexDB data.

Is there a way to read the indexDB data on 1st page rendering?

Thanks! 