Storage Quotas

There were several attempts made, mostly by Google Chrome, to allow web applications to query the system for the size of the storage space currently used and available for the application. The most recent one, Quota Estimation API, is also in development in Firefox as of June 2017.

The older implementation, supported only in Chrome with webkit- prefix, maintained a separation between the temporary and persistent storage and allowed the web applications to request for more storage space, if needed.

API glimpse

navigator.storage.estimate()
Returns a Promise resolved with the storage space estimated values; see below.
estimate.usage
Returns the estimated size of the storage currently used by the application, in bytes.
estimate.quota
Returns the estimated total size of the storage available for the application, in bytes, including already used.

Resources