Storage Pressure Event
- Category
- Offline / Storage
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- Start prototyping
WPT details: There are no web platform tests yet, but they will be written.
Summary
Adds early warning when the storage device backing the user's data is running low on free space. This warning is provided to currently running applications, which can pause or abandon in-progress operations that would otherwise fill up the user's storage device.
Motivation
A recent issue, which allowed bad actors to precisely measure free disk space, was patched because it could be exploited to measure the size of cross-origin resources or be used for fingerprinting. To patch this, Chrome no removed free disk space as a factor in calculating quota. This caused a regression, where applications start avoiding downloading a large corpus of data when the free disk space is low. For example, some applications would not enable offline sync for users with low free disk space. This was an attempt to avoid a bad user experience -- enabling offline sync would lead to a large amount of data being downloaded and stored locally, which would lead to running out of disk space, which could cause system instability such as OS crashes. This proposal aims to address this class of regressions.
Standards & signals
- Specification: https://storage.spec.whatwg.org/
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://crbug.com/1088004
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=storage-pressure-event
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Storage%20Pressure%20Event
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Storage%20Pressure%20Event
- Baseline status: https://webstatus.dev/?q=Storage%20Pressure%20Event
Docs: https://docs.google.com/document/d/1-ZzFe7ITnzW-G7uymhv_obPwfQjJwzA6wh10tfl5tCw/edit?usp=sharing
Explainers: https://github.com/jarryd999/Storage-Pressure-Event