Device-Memory header


目录

WARNING: The Device-Memory header was standardized as Sec-CH-Device-Memory and the new name is now preferred.

The HTTP 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 Device-Memory header from the client, by first sending the Accept-CH response header. Servers that opt in to the 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](https://developer.mozilla.org/en-US/docs/Glossary/Request%20header), Client hint
[Forbidden request header](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden%20request%20header) No

Syntax

Device-Memory: <number>

Directives

Examples

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

Accept-CH: Device-Memory

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

Device-Memory: 1

Specifications

Browser compatibility

See also


版本号 #3
由 壳壳虫 创建于 2026-10-31 03:27:53 UTC
由 cocobook-sync 更新于 2026-11-04 17:35:45 UTC