Question

I am lil lost here, in the Chrome development tool the DB i created is replicated multiple time.

enter image description here

The first few nodes are actually empty, only the last node has the DB tables. As you can see from the image the last node expands. What would cause this? I use the following code, to ensure it does not recreate the db I even use an if statement.

if(!db)db=window.openDatabase(localStorage.DB_NAME,'',localStorage.DB_DESC,localStorage.DB_SIZE*1024*1024,function(){console.log('created a new DB')});
Was it helpful?

Solution

Same just happened to me. Figured it out: you have multiple verssions of your code running, so chrome lists a node for each version. In my case, I had multiple nodes in the debugger window of my chrome extension's background page, which I had kept open while I tried different versions of my extension. Closing the window and opening it again fixed this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top