The Device Memory API allows Web applications to assess the class of the device by the size of the RAM memory installed. It might be used to identify the lower-end devices to provide the reduced, lightweight experience of the website for performance reasons. The value provided by the API does not hint how much of the memory is actually available for the application to use - its purpose is only to serve as a device class indication.
Device-Memory HTTP request header when the server previously opted-in to receiving this information with
Accept-CH: Device Memory HTTP response header, so that the server side might decide to serve the content optimized for the particular class of device.
- Returns the approximate total RAM memory size of the device, in GiB.
document.getElementById('result').innerHTML = navigator.deviceMemory || 'unknown'
Your device memory is ~<b id="result">unknown</b> GiB.