Skip to Content
Platform.Ontology

performance.memory (legacy heap size)

Reads JavaScript heap sizes in Chrome.

Gets silentlySpeed and timingMemoryWeb browsersWhen the page loads

In one line

Can see how much memory the page uses, in Chrome and Edge

Reads JavaScript heap sizes in Chrome.

Exposes usedJSHeapSize, totalJSHeapSize and jsHeapSizeLimit, which cluster by device RAM and OS (about 4 GB on 64-bit desktop, 2 GB on mobile). Values are quantized.

What it can and can't do

What the user does: Nothing. It happens when the page asks

It can

  • Get used, total and limit sizes for the page's memory
  • Guess your device memory, around 4 GB on desktop and 2 GB on phones
  • Find memory leaks in its own page

It cannot

  • See other tabs or apps
  • Get exact values, since they are rounded
  • Work in Firefox or Safari
  • Ask permission first

How it differs between platforms: Only Chrome and Edge. Firefox and Safari do not support it.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported72010-10-19None
EdgeSupported792020-01-15None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIperformance.memory.jsHeapSizeLimit; totalJSHeapSize; usedJSHeapSize
Browser compat keysapi.Performance.memory
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Read performance.memory

Data you get

What comes back: 3 integers (bucketed in non-isolated contexts)
Shape: object

FieldTypeUnitRangePrecision
jsHeapSizeLimitintegerbytes2147483648 to 4294967296bucketed
usedJSHeapSizeintegerbytes1 MB to 4 GBbucketed to about 10 KB or quantized

Technical limits

  • Chromium only
  • Non-standard

The story

What it is

An older Chrome feature that reports the size of JavaScript memory, rounded to blur the exact number.

For you

You never see it. It lets a site learn roughly how much memory your tab uses, and a rounded value hints at how much memory your device has. Newer tools have mostly replaced it.

For makers

Developers used it to catch leaks, but it is not precise and not standard. Some fraud and tracking tools read it as a clue to your device class. Chrome blurs the numbers to limit this.

Where you see it

TypeExampleApps
developerA developer logs memory use in a test to check that an app does not leak over time.None named
gamesA browser game watches heap growth to know when to free textures before the tab crashes.None named
securityA bot detector sees a heap size that is typical of a headless browser.None named
adsA tracker adds the rounded heap limit to a device ID, since it varies by device memory.None named
productivityA web office app warns you to save when memory use gets high.None named
analyticsA monitoring script records heap size at each page view to find slow releases.Datadog RUM
videoA video call site checks memory on old laptops to decide on lighter effects.None named

Risks

  • Chrome only
  • Hints at device memory

Good uses and abuse

Legitimate uses

  • Developer diagnostics

Known abuse

  • Adds RAM class signal

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits2Rough identifying entropy, when known

History

  • 2019-01, Chrome: Values quantized and bucketed to limit fingerprinting

Sources

How well checked: Based on official documentation.

On this page