title: Why does empty IndexedDB still take up space?
body: <p>I'm using an IndexedDB for saving game data in Chrome. </p>
  
  <p>An average game is about 4MB. After saving a few games, and then deleting them, the dev console's 'Resources' tab shows that my indexedDB is empty, as expected, but if I go to content settings, "Cookies and site data" it's showing me roughly 12MB as the indexedDB size on disk.</p>
  
  <p>This is a <em>after</em> a refresh and even a <em>restart</em> of Chrome. The following is my code for deletion and I'm getting success when I delete and a query for the old data returns nothing, as expected.</p>
  
  <pre><code>database.indexedDB.deleteGame = function(nameIn){
      var db = database.indexedDB.db;
      var trans = db.transaction(["saves"], "readwrite");
      var store = trans.objectStore("saves");
      var wipeSlate = store.delete(nameIn);
      wipeSlate.onsuccess = function(e) {
          console.log("Old game wiped");
      };
      wipeSlate.onerror = function(e) {
          console.log("I don't think the old game existed..." + e);
      };
  };
  </code></pre>
  
  <p>I've checked the following questions (and search results aren't showing anything too promising either):</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2431180/why-does-an-empty-database-take-megabytes-of-space">Why does an empty database take megabytes of space</a></li>
  <li><a href="https://stackoverflow.com/questions/14932258/does-an-empty-field-take-up-space-in-database">Does an empty field take up space in a database</a></li>
  <li><a href="https://stackoverflow.com/questions/11216744/indexeddb-deletedatabase-does-not-reset-version">IndexedDB deleteDatabase does not reset version</a></li>
  <li><a href="https://stackoverflow.com/questions/15240232/i-seem-to-be-getting-a-dirty-read-from-an-indexeddb-index-is-this-possible">I seem to be getting a dirty read from an IndexedDB index. Is this possible?</a></li>
  </ul>
  
  <p>But none of them deal with <em>my</em> question, any and all help very much appreciated.</p>