Skip to Content
Platform.Ontology

Storage quotas and eviction

How much each site may store on the device, per browser.

Works without askingFiles and storageStorageWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported612017-09-05None
EdgeSupported792020-01-15None
FirefoxSupported572017-11-14None
SafariSupported172023-09-18None
Safari on iPhoneSupported172023-09-18None
Chrome on AndroidSupported612017-09-05None
Samsung InternetSupported8.02018-07-18None

How a site asks for it

APInavigator.storage.estimate(); IndexedDB; Cache API; OPFS
Browser compat keysapi.StorageManager.estimate
How access is grantednone
What the user seesNo prompt; browser enforces quota and throws QuotaExceededError.
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsUntil evicted or cleared
How to take it backClear site data
Inside an iframeCross-origin frames get a fraction (Safari about 10% of the parent's)

Typical flow

  1. Write data
  2. Browser compares against the origin quota
  3. If exceeded throws QuotaExceededError
  4. 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

FieldTypeUnitRangePrecision
Chrome and Edgeintegerpercent of total diskup to 60% per origin; about 80% across the browserbytes
Firefox best effortintegerbytesmin(10% of disk, 10 GiB) per origin; 10 GiB per eTLD+1 groupbytes
Firefox persistentintegerpercent of diskup to 50%, capped at 8 TiBbytes
Safari 14+ and iOS 17+integerpercent of diskabout 60% per origin; 80% total; embedded WebViews 15% and 20%bytes
localStorage and sessionStorageintegerMiB5 each per originabout 10 MB UTF-16
Chrome opaque response paddingintegerbytesabout 7 MB per opaque cross-origin responsefingerprint 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

TypeExampleApps
gamesA browser game with large levels checks the quota first, then downloads only what fits.None named
mediaA podcast or music web app tells you how many songs it can keep offline.None named
creativeA web video editor warns you before a project grows beyond the space it can store.None named
productivityA web email app keeps the last month of mail offline, as much as the quota allows.Gmail
securityA fraud service notes a tiny quota, which can mean private mode or an emulator.None named
analyticsA site team measures typical quotas to design offline features.None named
adsA 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

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

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits2Rough 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

Sources

How well checked: Checked against real behavior.

On this page