I'd like to get a breakdown of how much storage space a web app I'm working on is taking up. More specifically I'm interested in the size of data stored in indexedDB.
I know I can use navigator.storage.estimate()
to get a total value, but it shows over 1 mbyte even with an empty db, and I'm interested in knowing the size of indexedDB specifically.
Is there a way to check the size?
navigator.storage.estimate().usageDetails
provides a breakdown by storage type, but it's not supported in Firefox/Safari (see browser compatibility)Note: The returned values are not exact: between compression, deduplication, and obfuscation for security reasons, they will be imprecise.