From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/http/headers/dpr/index.html | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 files/ja/web/http/headers/dpr/index.html (limited to 'files/ja/web/http/headers/dpr') diff --git a/files/ja/web/http/headers/dpr/index.html b/files/ja/web/http/headers/dpr/index.html new file mode 100644 index 0000000000..5c696673e1 --- /dev/null +++ b/files/ja/web/http/headers/dpr/index.html @@ -0,0 +1,61 @@ +--- +title: DPR +slug: Web/HTTP/Headers/DPR +tags: + - Client hints + - HTTP + - HTTP Header +translation_of: Web/HTTP/Headers/DPR +--- +
{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}
+ +

DPR ヘッダーは、CSS ピクセル毎に対応する物理デバイスピクセルの数であるクライアントのデバイスピクセル比 (device pixel ratio、{{Glossary("DPR")}})) を表すクライアントヒントのヘッダーです。

+ + + + + + + + + + + + +
ヘッダー種別{{Glossary("Request header","リクエストヘッダー")}}
{{Glossary("Forbidden header name","禁止ヘッダー名")}}?
+ +
+

: クライアントヒントには、安全なオリジン(TLS 経由)でのみアクセスできます。 サーバーは、{{HTTPHeader("Accept-CH")}} および {{HTTPHeader("Accept-CH-Lifetime")}} のレスポンスヘッダーを送信することによって、クライアントから DPR ヘッダーを受信することを選択する必要があります。

+
+ +

構文

+ +
DPR: <number>
+
+ +

+ +

サーバーはまず、レスポンスヘッダーとして DPR を含む {{HTTPHeader("Accept-CH")}} と {{HTTPHeader("Accept-CH-Lifetime")}} を送信することによって、DPR ヘッダーを受信するように選択する必要があります。

+ +
Accept-CH: DPR
+Accept-CH-Lifetime: 86400
+
+ +

次に、後続のリクエストでクライアントは、次のように DPR ヘッダーを送り返す場合があります。

+ +
DPR: 1.0
+
+ +

ブラウザーの互換性

+ + + +

{{Compat("http.headers.DPR")}}

+ +

関連情報

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