Spec-Zone.ru › HTTP

Headers: Sec-CH-Device-Memory

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.

Want more support for this feature? Tell us why.

  • Learn more
  • See full compatibility
>

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

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:

Accept-CH: Sec-CH-Device-Memory

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

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
97["Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.", "From Chrome 147, reported values are 2, 4, 8, 16, and 32."]
61["Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.", "From Chrome 147, reported values are 2, 4, 8, 16, and 32."]
97["Before Edge 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.", "From Edge 147, reported values are 2, 4, 8, 16, and 32."]
79["Before Edge 147, reported values were 0.25, 0.5, 1, 2, 4, and 8.", "From Edge 147, reported values are 2, 4, 8, 16, and 32."]
No
83["Before Opera 131, reported values were 0.25, 0.5, 1, 2, 4, and 8.", "From Opera 131, reported values are 2, 4, 8, 16, and 32."]
48["Before Opera 131, reported values were 0.25, 0.5, 1, 2, 4, and 8.", "From Opera 131, reported values are 2, 4, 8, 16, and 32."]
No
97["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
61["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
No
68["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
45["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
No
18.0["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
8.0["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
97["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
61["From Chrome 147, reported values are 1, 2, 4, and 8.", "Before Chrome 147, reported values were 0.25, 0.5, 1, 2, 4, and 8."]
No

See also

  • Improving user privacy and developer experience with User-Agent Client Hints (developer.chrome.com)
  • Device Memory API
  • Navigator.deviceMemory
  • WorkerNavigator.deviceMemory
  • Device and responsive image client hints
    • Sec-CH-DPR
    • Sec-CH-Viewport-Height
    • Sec-CH-Viewport-Width
    • Device-Memory
  • Accept-CH
  • HTTP Caching: Vary and Vary

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Sec-CH-Device-Memory

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API