diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/headers/link | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/link')
-rw-r--r-- | files/zh-cn/web/http/headers/link/index.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/link/index.html b/files/zh-cn/web/http/headers/link/index.html new file mode 100644 index 0000000000..f76e635f75 --- /dev/null +++ b/files/zh-cn/web/http/headers/link/index.html @@ -0,0 +1,65 @@ +--- +title: Link +slug: Web/HTTP/Headers/Link +translation_of: Web/HTTP/Headers/Link +--- +<p>{{HTTPSidebar}}{{Draft}}</p> + +<p>HTTP实体报头 <strong><code>Link</code></strong> 提供了序列化HTTP头部链接的方法。它在语义上与HTML元素 {{HTMLElement("link")}} 相等。</p> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox">Link: < <var>uri-reference</var> >; <var>param1</var>=<var>value1</var>; <var>param2</var>="<var>value2</var>"</pre> + +<dl> + <dt><code><uri-reference></code></dt> + <dd>URI reference 必须要用 <code><</code> 和 <code>></code>来关闭。</dd> +</dl> + +<h3 id="参数">参数</h3> + +<p>link头部包含以 <code>;</code> 分隔的参数,这些参数与HTML元素 {{HTMLElement("link")}} 的属性一致。</p> + +<h2 id="示例">示例</h2> + +<p>URI 必须要用 <code><</code> 和 <code>> 来关闭:</code></p> + +<pre class="brush: http; no-line-numbers example-good">Link: <https://example.com>; rel="preload"</pre> + +<pre class="brush: http; no-line-numbers example-bad">Link: https://bad.example; rel="preload"</pre> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comments</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{RFC(8288, "Link Serialisation in HTTP Headers", 3)}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td></td> + </tr> + <tr> + <td>{{RFC(5988, "The Link Header Field", 5)}}</td> + <td><span class="spec-RFC">IETF RFC</span></td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("http.headers.Link")}}</p> + +<h2 id="参见">参见</h2> + +<ul> + <li>{{HTTPStatus(103, "103 Early Hints")}}</li> +</ul> |