Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Navigator
  4. deviceMemory

Navigator: deviceMemory property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

ThedeviceMemory read-onlyproperty of theNavigator interface returns the approximate amount ofdevice memory in gigabytes.

The reported value is imprecise to curtailfingerprinting. It's approximated byrounding down to the nearest power of 2, then dividing that number by 1024. It is thenclamped within lower and upper bounds to protect the privacy of owners of very low-memory orhigh-memory devices.

Value

A floating point number; one of0.25,0.5,1,2,4,8.

Examples

js
const memory = navigator.deviceMemory;console.log(`This device has at least ${memory}GiB of RAM.`);

Specifications

Specification
Device Memory
# sec-device-memory-js-api

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp