Storage quotas and eviction
How much each site may store on the device, per browser.
In one line
Can store only what your browser allows, and may lose it when space is low
How much each site may store on the device, per browser.
Caps how much a site can keep (IndexedDB, Cache, files). Large quotas let a site store gigabytes; quota values are derived from total disk size, so estimate() was padded to limit fingerprinting.
What it can and can't do
What the user does: Nothing. It happens when the page loads.
It can
- Check roughly how much space it has used and may use
- Store data up to its limit
- Get an error when the limit is reached
It cannot
- Go over its limit, which varies by browser and free disk
- Stop the browser clearing it when space is low, unless storage is protected
- See your exact free disk space, since the numbers are rough
How it differs between platforms: Limits differ by browser. Chrome, Firefox and Safari each set their own caps.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 61 | 2017-09-05 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 57 | 2017-11-14 | None |
| Safari | Supported | 17 | 2023-09-18 | None |
| Safari on iPhone | Supported | 17 | 2023-09-18 | None |
| Chrome on Android | Supported | 61 | 2017-09-05 | None |
| Samsung Internet | Supported | 8.0 | 2018-07-18 | None |
How a site asks for it
| API | navigator.storage.estimate(); IndexedDB; Cache API; OPFS |
| Browser compat keys | api.StorageManager.estimate |
| How access is granted | none |
| What the user sees | No prompt; browser enforces quota and throws QuotaExceededError. |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | No |
| How long it lasts | Until evicted or cleared |
| How to take it back | Clear site data |
| Inside an iframe | Cross-origin frames get a fraction (Safari about 10% of the parent's) |
Typical flow
- Write data
- Browser compares against the origin quota
- If exceeded throws QuotaExceededError
- Under disk pressure unprotected origins are evicted least recently used, all or nothing
Data you get
What comes back: usage and quota estimate
Shape: object
How often: on call
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
Chrome and Edge | integer | percent of total disk | up to 60% per origin; about 80% across the browser | bytes |
Firefox best effort | integer | bytes | min(10% of disk, 10 GiB) per origin; 10 GiB per eTLD+1 group | bytes |
Firefox persistent | integer | percent of disk | up to 50%, capped at 8 TiB | bytes |
Safari 14+ and iOS 17+ | integer | percent of disk | about 60% per origin; 80% total; embedded WebViews 15% and 20% | bytes |
localStorage and sessionStorage | integer | MiB | 5 each per origin | about 10 MB UTF-16 |
Chrome opaque response padding | integer | bytes | about 7 MB per opaque cross-origin response | fingerprint defense (secondary) |
Technical limits
- Quota computed from total disk, not free space
- Safari deletes script-written data after 7 days without interaction (ITP)
- Eviction is LRU and all or nothing per origin
The story
What it is
How much each site may store on your device, which differs by browser.
For you
You never see the limit, until a site runs out of room. Then it may stop saving, ask you to free space or lose offline data.
For makers
Makers plan their offline features around the limit. A big game or editor needs lots of space. The quota number and the way it behaves can also help tell browsers and private modes apart.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A browser game with large levels checks the quota first, then downloads only what fits. | None named |
| media | A podcast or music web app tells you how many songs it can keep offline. | None named |
| creative | A web video editor warns you before a project grows beyond the space it can store. | None named |
| productivity | A web email app keeps the last month of mail offline, as much as the quota allows. | Gmail |
| security | A fraud service notes a tiny quota, which can mean private mode or an emulator. | None named |
| analytics | A site team measures typical quotas to design offline features. | None named |
| ads | A fingerprint script reads the exact quota number as one more clue about your device and disk. | None named |
Risks
- Fingerprint clue
- Reveals disk size
What the platform says
- web.dev: Storage for the web. Google explains how much a site can store and how browsers manage quota and cleanup.
- WebKit: Updates to storage policy. Apple explains the new Safari limits on how much a site can store.
Good uses and abuse
Legitimate uses
- Offline apps
- Large model and media caches
Known abuse
- Fingerprinting via quota estimates
- Filling disks with cached data
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
History
- 2017-06, Firefox 57: Eviction policy moved to origin groups
- 2023-09, Safari 17: Per-origin quota raised to about 60% of disk
Related capabilities
Related
- Persistent storage (persist). Can ask the browser not to delete its saved data when disk space is low
Sources
How well checked: Checked against real behavior.