我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The deviceMemory read-only property of the navigator interface returns the amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024.


var memory = navigator.deviceMemory


A floating point number.


Specification Status Comment
Device Memory 1
The definition of 'deviceMemory' in that specification.
Editor's Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support63 ? ? ?50 ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support6363 ? ?50 ? ?


此页面的贡献者: connorshea, jpmedley
最后编辑者: connorshea,