Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
investigating indexeddb storage in chromium browser and cleaning it from javascript

I am developing PWA 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 1 gb(!!!) is consumed by the indexedDb!

enter image description here

I went to investigate further, and it seems like this storage is being shared between all localhost environments: https://localhost:4173/, https://localhost:3000/. Same consumption is reported by both sites.

I went ahead and clicked on "Clear site data" 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

I also ran the filesystem analyzer and was able to determine that this is in fact these 2 addresses that consume the space. 522.9mb each

enter image description here

In PWA users are able to see the space consumption estimate through the navigator.storage API:

    if ("storage" in navigator && "estimate" in navigator.storage) {
        return navigator.storage.estimate();
      }

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..

So my question is - what kind of data is in there and more importantly how do I clear it from the javascript? Because I have done the cleaning for both the 4173 and 3000 ports manually and nothing has changed..

Any advices or solutions are welcomed. I am using the "Ms Edge v100" chromium-based browser.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Did you try?

let req = indexedDB.deleteDatabase(databaseName);
req.onsuccess = function () {
    console.log("Deleted database successfully");
};
req.onerror = function () {
    console.log("Couldn't delete database");
};
req.onblocked = function () {
    console.log("Couldn't delete database due to the operation being blocked");

Also you can manually delete it like this:

enter image description here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda