From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../web/http/headers/device-memory/index.html | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 files/pt-br/web/http/headers/device-memory/index.html (limited to 'files/pt-br/web/http/headers/device-memory/index.html') diff --git a/files/pt-br/web/http/headers/device-memory/index.html b/files/pt-br/web/http/headers/device-memory/index.html new file mode 100644 index 0000000000..73f2cc3185 --- /dev/null +++ b/files/pt-br/web/http/headers/device-memory/index.html @@ -0,0 +1,84 @@ +--- +title: Device-Memory +slug: Web/HTTP/Headers/Device-Memory +tags: + - Cabeçalho HTTP + - Client hints + - Device Memory API + - HTTP + - cabeçalho +translation_of: Web/HTTP/Headers/Device-Memory +--- +
{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}
+ +

O cabeçalho Device-Memory é um cabeçalho da Device Memory API que funciona como os cabeçalhos Client Hints que representão a quantidade aproximada de RAM que o dispositivo do cliente possui.

+ + + + + + + + + + + + +
Tipo de cabeçalho{{Glossary("Request header")}}
{{Glossary("Forbidden header name")}}?
+ +
+

Nota: Client Hints são acessíveis somente em origens seguras (via TLS). O servidor pode optar em receber o cabeçalho Device-Memory do cliente mandando os cabeçalhos de resposta {{HTTPHeader("Accept-CH")}} e {{HTTPHeader("Accept-CH-Lifetime")}}.

+
+ +

Sintaxe

+ +

A quantidade de RAM no dispositivo pode ser usada como variável de pegada, The amount of device RAM can be used as a fingerprinting variable, então os valores para este cabeçalho são intencionalmente grosseiros para reduzir potenciais usos indesejados. O cabeçalho pode ter os seguintes valores: 0.25, 0.5, 1, 2, 4, 8.

+ +
Device-Memory: <number>
+
+ +

Exemplos

+ +

O servidor precisa primeiro optar por aceitar o cabeçalho Device-Memory mandando os cabeçalhos de resposta {{HTTPHeader("Accept-CH")}} contendo Device-Memory e {{HTTPHeader("Accept-CH-Lifetime")}}.

+ +
Accept-CH: Device-Memory
+Accept-CH-Lifetime: 86400
+
+ +

Então nas requisições subsequentes, o cliente enviará o cabeçalho Device-Memory de volta:

+ +
Device-Memory: 1
+
+ +

Especificações

+ + + + + + + + + + + + + + +
EspecificaçãoStatusComentário
{{SpecName("Device Memory","#sec-device-memory-client-hint-header","Device-Memory")}}{{Spec2('Device Memory')}}Definição inicial.
+ +

Compatibilidade de navegador

+ + + +

{{Compat("http.headers.Device-Memory")}}

+ +

Veja também

+ + -- cgit v1.2.3-54-g00ecf