Re: [whatwg/storage] StorageEstimate.quota + Storage Pressure (#73)

Here is some common ground we found at TPAC 2019.

## Use Case

A compelling use case is supporting the scenario where the user enables offline, the application starts syncing gigabytes of contents to the user's device and, during the sync, the browser notices that the disk  is running low on free space.

On devices that run multiple applications at the same time, the browser cannot easily reserve space for the application at the beginning of the sync. The browser can tell the application to stop syncing early, and can give this signal early enough that the application can stop gracefully. The alternative is that writes start to fail with quota exceeded errors.

## Mechanism

The signal will be a `quotachange` event on the `StorageManager` interface. This works today, and will work in a world where storage buckets inherit from `StorageManager`.

Still TBD is how available quota would change to reflect the fact that free disk space is running low. We can't expose the exact amount of free disk space to Web applications, because that would allow malicious apps to learn the size of cross-origin resources by writing them to Cache Storage.

@asutherland Please correct/flag anything I'm misremembering.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/storage/issues/73#issuecomment-535541438

Received on Thursday, 26 September 2019 14:53:00 UTC