title: investigating indexeddb storage in chromium browser and cleaning it from javascript
body: <p>I am developing <code>PWA</code> app where storage usage (for offline data) is a crucial factor to success. After checking the storage information in debug tools I see that more than <code>1 gb</code>(<strong>!!!</strong>) is consumed by the <code>indexedDb</code>!</p>
  <p><a href="https://i.stack.imgur.com/Yt3tT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yt3tT.png" alt="enter image description here" /></a></p>
  <p>I went to investigate further, and it seems like this storage is being shared between all <code>localhost</code> environments: <code>https://localhost:4173/</code>, <code>https://localhost:3000/</code>. Same consumption is reported by both sites.</p>
  <p>I went ahead and clicked on &quot;<strong>Clear site data</strong>&quot; button, but only 1mb of data was cleared (there are literary no databases or caches or anything like that for both websites). I even restarted the browser</p>
  <p>I also ran the filesystem analyzer and was able to determine that this is in fact these 2 addresses that consume the space. <code>522.9mb</code> each</p>
  <p><a href="https://i.stack.imgur.com/IpoJe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IpoJe.png" alt="enter image description here" /></a></p>
  <p>In PWA users are able to see the space consumption estimate through the <code>navigator.storage</code> API:</p>
  <pre><code>    if (&quot;storage&quot; in navigator &amp;&amp; &quot;estimate&quot; in navigator.storage) {
          return navigator.storage.estimate();
        }
  </code></pre>
  <p>So when the space grows more than let's say 100mg and users want to clean-up some space - it should be possible to clear it from the UI of the app.. right not I can't even clear it manually using the browser tools. I view this as a huge problem to both the customer experience and technical implementation if this space can not be freed..</p>
  <p>So my question is - what kind of data is in there and more importantly how do I clear it from the <code>javascript</code>? Because I have done the cleaning for both the 4173 and 3000 ports manually and nothing has changed..</p>
  <p>Any advices or solutions are welcomed. I am using the &quot;Ms Edge v100&quot; chromium-based browser.</p>