From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- .../accept/index.html" | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 "files/uk/web/http/\320\267\320\260\320\263\320\276\320\273\320\276\320\262\320\272\320\270/accept/index.html" (limited to 'files/uk/web/http/заголовки/accept/index.html') diff --git "a/files/uk/web/http/\320\267\320\260\320\263\320\276\320\273\320\276\320\262\320\272\320\270/accept/index.html" "b/files/uk/web/http/\320\267\320\260\320\263\320\276\320\273\320\276\320\262\320\272\320\270/accept/index.html" new file mode 100644 index 0000000000..0927cca0d3 --- /dev/null +++ "b/files/uk/web/http/\320\267\320\260\320\263\320\276\320\273\320\276\320\262\320\272\320\270/accept/index.html" @@ -0,0 +1,85 @@ +--- +title: Accept +slug: Web/HTTP/Заголовки/Accept +translation_of: Web/HTTP/Headers/Accept +--- +
{{HTTPSidebar}}
+ +

Accept请求的HTTP标头通告哪些内容类型,表示为MIME类型,客户端是能够理解的。使用内容协商,服务器然后选择其中一个提议,使用它并通过{{HTTPHeader(“Content-Type”)}}响应标头通知客户端它的选择。浏览器根据请求完成的上下文为此标头设置了足够的值:在获取CSS样式表时,为请求设置的值与获取图像,视频或脚本时的值不同。

+ + + + + + + + + + + + + + + + +
标题类型{{词汇表(“请求标题”)}}
{{词汇表(“禁止标题名称”)}}没有
{{词汇表(“简单标题”,“CORS-safelisted request-header”)}}
+ +

句法

+ +
接受:<MIME_type> / <MIME_subtype>
+接受:<MIME_type> / *
+接受:* / *
+
+//多种类型,使用{{词汇表(“质量值”,“质量值”)}}语法加权:
+接受:text / html,application / xhtml + xml,application / xml; q = 0.9,* / *; q = 0.8
+ +

指令

+ +
+
<MIME_type>/<MIME_subtype>
+
单一,精确的MIME类型,如text/html
+
<MIME_type>/*
+
MIME类型,但没有任何子类型。image/*将匹配image/pngimage/svgimage/gif和任何其他的图像类型。
+
*/*
+
任何MIME类型
+
;q= (q因子加权)
+
使用的任何值都按照优先顺序放置,使用称为权重的相对质量值表示
+
+ +

例子

+ +
接受:text / html
+
+接受:图片/ *
+
+接受:text / html,application / xhtml + xml,application / xml; q = 0.9,* / *; q = 0.8
+
+ +

产品规格

+ + + + + + + + + + + + +
规范标题
{{RFC(“7231”,“接受”,“5.3.2”)}}超文本传输​​协议(HTTP / 1.1):语义和上下文
+ +

浏览器兼容性

+ + + +

{{COMPAT( “http.headers.Accept”)}}

+ +

也可以看看

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