Sec-CH-Device-Memory header

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 in secure contexts (HTTPS), in some or all supporting browsers.

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

The HTTP Sec-CH-Device-Memory request header is used in device client hints to indicate the approximate amount of available RAM on the client device, in gigabytes. The header is part of the Device Memory API.

Client hints are accessible only on secure origins. A server has to opt in to receive the Sec-CH-Device-Memory header from the client, by first sending the Accept-CH response header. Servers that opt in to the Sec-CH-Device-Memory client hint will typically also specify it in the Vary header to inform caches that the server may send different responses based on the header value in a request.

Header type Request header, Client hint
Forbidden request header No

Syntax

http
Sec-CH-Device-Memory: <number>

Directives

<number>

The approximate amount of device RAM.

The amount of device RAM can be used as a fingerprinting variable, so values for the header are intentionally coarse to reduce the potential for its misuse. Values are only reported in powers of two, and are clamped to an implementation-defined minimum lower value and a maximum upper value. These bounds may change over time (see browser compatibility table).

For example, if a browser does not report below 2 or above 32 then the value is one of: 2, 4, 8, 16, 32.

Examples

The server first needs to opt in to receive Sec-CH-Device-Memory header by sending the Accept-CH response header containing Sec-CH-Device-Memory:

http
Accept-CH: Sec-CH-Device-Memory

Then on subsequent requests the client might send Sec-CH-Device-Memory header back:

http
Sec-CH-Device-Memory: 1

Specifications

Specification
Device Memory API
# iana-device-memory

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Sec-CH-Device-Memory request header
Experimental
Chrome – Full support
Chrome 61 (Release date: 2017-09-05)
footnote , altname
altname Alternate name: Device-Memory
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
footnote From Chrome 147, reported values are 2, 4, 8, 16, and 32.
Chrome – Full support
Chrome 97 (Release date: 2022-01-04)
footnote
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
footnote From Chrome 147, reported values are 2, 4, 8, 16, and 32.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote , altname
altname Alternate name: Device-Memory
footnote Before Edge 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
footnote From Edge 147, reported values are 2, 4, 8, 16, and 32.
Edge – Full support
Edge 97 (Release date: 2022-01-06)
footnote
footnote Before Edge 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
footnote From Edge 147, reported values are 2, 4, 8, 16, and 32.
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 48 (Release date: 2017-09-27)
footnote , altname
altname Alternate name: Device-Memory
footnote Before Opera 131, reported values were 0.25, 0.5, 1, 2, 4, and 8.
footnote From Opera 131, reported values are 2, 4, 8, 16, and 32.
Opera – Full support
Opera 83 (Release date: 2022-01-19)
footnote
footnote Before Opera 131, reported values were 0.25, 0.5, 1, 2, 4, and 8.
footnote From Opera 131, reported values are 2, 4, 8, 16, and 32.
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 61 (Release date: 2017-09-05)
footnote , altname
altname Alternate name: Device-Memory
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
Chrome Android – Full support
Chrome Android 97 (Release date: 2022-01-04)
footnote
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 45 (Release date: 2018-02-15)
footnote , altname
altname Alternate name: Device-Memory
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
Opera Android – Full support
Opera Android 68 (Release date: 2022-03-30)
footnote
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote , altname
altname Alternate name: Device-Memory
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
Samsung Internet – Full support
Samsung Internet 18 (Release date: 2022-08-08)
footnote
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
WebView Android – Full support
WebView Android 61 (Release date: 2017-09-05)
footnote , altname
altname Alternate name: Device-Memory
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
WebView Android – Full support
WebView Android 97 (Release date: 2022-01-04)
footnote
footnote From Chrome 147, reported values are 1, 2, 4, and 8.
footnote Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Uses a non-standard name
Has more compatibility info.

See also