aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/http/headers/index.html')
-rw-r--r--files/zh-cn/web/http/headers/index.html550
1 files changed, 550 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/index.html b/files/zh-cn/web/http/headers/index.html
new file mode 100644
index 0000000000..46b0f9df66
--- /dev/null
+++ b/files/zh-cn/web/http/headers/index.html
@@ -0,0 +1,550 @@
+---
+title: HTTP Headers
+slug: Web/HTTP/Headers
+tags:
+ - HTTP Headers
+translation_of: Web/HTTP/Headers
+---
+<p>{{ HTTPSidebar }}</p>
+
+<p><strong>HTTP 消息头</strong>允许客户端和服务器通过<strong> request</strong>和<strong> response</strong>传递附加信息。一个请求头由名称(不区分大小写)后跟一个冒号“:”,冒号后跟具体的值(不带换行符)组成。该值前面的引导空白会被忽略。</p>
+
+<p>自定专用消息头可通过'X-' 前缀来添加;但是这种用法被IETF在2012年6月发布的 <a href="https://tools.ietf.org/html/rfc6648">RFC5548</a> 中明确弃用,原因是其会在非标准字段成为标准时造成不便;其他的消息头在 <a class="external" href="http://www.iana.org/assignments/message-headers/perm-headers.html" title="http://www.iana.org/assignments/message-headers/perm-headers.html">IANA 注册表</a> 中列出, 其原始内容在 <a class="external" href="http://tools.ietf.org/html/rfc4229" title="http://tools.ietf.org/html/rfc4229">RFC 4229</a> 中定义。 此外,IANA 还维护着<a class="external" href="http://www.iana.org/assignments/message-headers/prov-headers.html" title="http://www.iana.org/assignments/message-headers/prov-headers.html">被提议的新HTTP 消息头注册表</a>.</p>
+
+<p>根据不同上下文,可将消息头分为:</p>
+
+<ul>
+ <li>{{Glossary("General header", "General headers")}}: 同时适用于请求和响应消息,但与最终消息主体中传输的数据无关的消息头。</li>
+ <li>{{Glossary("Request header", "Request headers")}}: 包含更多有关要获取的资源或客户端本身信息的消息头。</li>
+ <li>{{Glossary("Response header", "Response headers")}}: 包含有关响应的补充信息,如其位置或服务器本身(名称和版本等)的消息头。</li>
+ <li>{{Glossary("Entity header", "Entity headers")}}: 包含有关实体主体的更多信息,比如主体长(Content-Length)度或其MIME类型。</li>
+</ul>
+
+<p>消息头也可以根据代理对其的处理方式分为:</p>
+
+<p><strong>端到端消息头</strong></p>
+
+<p>这类消息头必须被传输到最终的消息接收者,也即,请求的服务器或响应的客户端。中间的代理服务器必须转发未经修改的端到端消息头,并且必须缓存它们。</p>
+
+<p><strong>逐跳消息头</strong></p>
+
+<p>这类消息头仅对单次传输连接有意义,不能通过代理或缓存进行重新转发。这些消息头包括 {{ httpheader("Connection") }}, {{ httpheader("Keep-Alive") }}, {{ httpheader("Proxy-Authenticate") }}, {{ httpheader("Proxy-Authorization") }}, {{ httpheader("TE") }}, {{ httpheader("Trailer") }}, {{ httpheader("Transfer-Encoding") }} 及 {{ httpheader("Upgrade") }}。注意,只能使用 {{ httpheader("Connection") }} 来设置逐跳一般头。</p>
+
+<p>左侧导航栏提供了按字母顺序排列的列表。以下列清单概括了消息头及其用途:</p>
+
+<table class="standard-table" style="width: 100%;">
+ <tbody>
+ <tr>
+ <th>消息头</th>
+ <th>描述</th>
+ <th>更多信息</th>
+ <th>标准</th>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Accept.3a_header" title="https://developer.mozilla.org/en/HTTP/Content_negotiation#The_Accept.3a_header">Accept</a></code></td>
+ <td>用户代理期望的MIME 类型列表</td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>HTTP/1.1</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Accept-CH_header">Accept-CH</a></code>
+ <p>{{non-standard_inline}}</p>
+ </td>
+ <td>列出配置数据,服务器可据此来选择适当的响应。</td>
+ <td><a href="http://igrigorik.github.io/http-client-hints">HTTP Client Hints</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Accept-Charset.3a_header" title="https://developer.mozilla.org/en/HTTP/Content_negotiation#The_Accept-Charset.3a_header">Accept-Charset</a></code></td>
+ <td>列出用户代理支持的字符集。</td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>HTTP/1.1</td>
+ </tr>
+ <tr>
+ <td><code>Accept-Features</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>RFC 2295, §8.2</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Accept-Encoding.3a_header" title="https://developer.mozilla.org/en/HTTP/Content_negotiation#The_Accept-Encoding.3a_header">Accept-Encoding</a></code></td>
+ <td>列出用户代理支持的压缩方法。</td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>HTTP/1.1</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Accept-Language.3a_header" title="https://developer.mozilla.org/en/HTTP/Content_negotiation#The_Accept-Language.3a_header">Accept-Language</a></code></td>
+ <td>列出用户代理期望的页面语言。</td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="https://developer.mozilla.org/en/Content_negotiation">HTTP Content Negotiation</a></td>
+ <td>HTTP/1.1</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Accept-Ranges" title="en/Accept-Ranges">Accept-Ranges</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Allow-Credentials" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Credentials">Access-Control-Allow-Credentials</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Allow-Origin" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Origin">Access-Control-Allow-Origin</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Allow-Methods" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Methods">Access-Control-Allow-Methods</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Allow-Headers" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Headers">Access-Control-Allow-Headers</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Max-Age" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Max-Age">Access-Control-Max-Age</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Expose-Header" title="en/HTTP access control#Access-Control-Expose-Header">Access-Control-Expose-Headers</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("2") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Request-Method" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Request-Method">Access-Control-Request-Method</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Access-Control-Request-Headers" title="https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Request-Headers">Access-Control-Request-Headers</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td><a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Age" title="en/Age">Age</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Allow" title="en/Allow">Allow</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>Alternates</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>RFC 2295, §8.3</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Authorization" title="en/Authorization">Authorization</a></code></td>
+ <td>包含用服务器验证用户代理的凭证</td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Cache-Control" title="en/Cache-Control">Cache-Control</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Connection" title="en/Connection">Connection</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Encoding" title="en/Content-Encoding">Content-Encoding</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Language" title="en/Content-Language">Content-Language</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Length" title="en/Content-Length">Content-Length</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Location" title="en/Content-Location">Content-Location</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-MD5" title="en/Content-MD5">Content-MD5</a></code></td>
+ <td></td>
+ <td>{{ unimplemented_inline("232030") }}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Range" title="en/Content-Range">Content-Range</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Security-Policy" title="en/Content-Security-Policy">Content-Security-Policy</a></code></td>
+ <td>控制用户代理在一个页面上可以加载使用的资源。</td>
+ <td><a href="/en/Security/CSP">CSP (Content Security Policy)</a></td>
+ <td><a href="http://www.w3.org/TR/CSP2/">W3C Content Security Policy</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Content-Type" title="en/Content-Type">Content-Type</a></code></td>
+ <td>指示服务器文档的MIME 类型。帮助用户代理(浏览器)去处理接收到的数据。</td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Cookie" title="en/Cookie">Cookie</a></code></td>
+ <td></td>
+ <td></td>
+ <td><a class="external" href="http://www.ietf.org/rfc/rfc2109.txt" title="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</a></td>
+ </tr>
+ <tr>
+ <td><code>DNT</code></td>
+ <td>设置该值为1, 表明用户明确退出任何形式的网上跟踪。</td>
+ <td>Supported by Firefox 4, Firefox 5 for mobile, IE9, and a few major companies.</td>
+ <td>{{SpecName("Tracking")}}</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Date" title="en/Date">Date</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/ETag" title="en/ETag">ETag</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Expect" title="en/Expect">Expect</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Expires" title="en/Expires">Expires</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/From" title="en/From">From</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Host" title="en/Host">Host</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/If-Match" title="en/If-Match">If-Match</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/If-Modified-Since" title="en/If-Modified-Since">If-Modified-Since</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/If-None-Match" title="en/If-None-Match">If-None-Match</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/If-Range" title="en/If-Range">If-Range</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since" title="en/If-Unmodified-Since">If-Unmodified-Since</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Last-Event-ID" title="en/Last-Event-ID">Last-Event-ID</a></code></td>
+ <td>给出服务器在先前HTTP连接上接收的最后事件的ID。用于同步文本/事件流。</td>
+ <td><a href="/en-US/docs/Server-sent_events" title="en/Server-Sent Events">Server-Sent Events</a></td>
+ <td><a class="external" href="http://dev.w3.org/html5/eventsource/" title="http://dev.w3.org/html5/eventsource/">Server-Sent Events spec</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Last-Modified" title="en/Last-Modified">Last-Modified</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Link" title="en/HTTP/Headers/Link">Link</a></code></td>
+ <td>
+ <p>等同于HTML标签中的"link",但它是在HTTP层上,给出一个与获取的资源相关的URL以及关系的种类。</p>
+ </td>
+ <td>
+ <p>For the <code>rel=prefetch</code> case, see <a href="/en-US/docs/Link_prefetching_FAQ" title="en/Link prefetching FAQ">Link Prefetching FAQ</a></p>
+ </td>
+ <td>
+ <p>Introduced in <a class="external" href="http://tools.ietf.org/html/rfc2068#section-19.6.2.4" title="http://tools.ietf.org/html/rfc2068#section-19.6.2.4">HTTP 1.1's RFC 2068, section 19.6.2.4</a>, it was removed in the final <a class="external" href="http://www.w3.org/Protocols/rfc2616/rfc2616.html" title="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP 1.1 spec</a>, then reintroduced, with some extensions, in <a class="external" href="http://greenbytes.de/tech/webdav/rfc5988.html" title="http://greenbytes.de/tech/webdav/rfc5988.html">RFC 5988</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Location" title="en/Location">Location</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Max-Forwards" title="en/Max-Forwards">Max-Forwards</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>Negotiate</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>RFC 2295, §8.4</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/HTTP_access_control#Origin" title="https://developer.mozilla.org/En/HTTP_access_control#Origin">Origin</a></code></td>
+ <td></td>
+ <td><a href="/en-US/docs/HTTP_access_control" title="En/HTTP access control">HTTP Access Control</a> and <a href="/en-US/docs/Server-Side_Access_Control" title="En/Server-Side Access Control">Server Side Access Control</a>{{ gecko_minversion_inline("1.9.1") }}</td>
+ <td>More recently defined in the <a href="https://fetch.spec.whatwg.org/#http-extensions">Fetch spec</a> (see <a href="/en-US/docs/Web/API/Fetch_API">Fetch API</a>.) Originally defined in <a class="external" href="http://www.w3.org/TR/cors/" title="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Pragma" title="en/Pragma">Pragma</a></code></td>
+ <td></td>
+ <td>for the pragma: nocache value see <a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Proxy-Authenticate" title="en/Proxy-Authenticate">Proxy-Authenticate</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Proxy-Authorization" title="en/Proxy-Authorization">Proxy-Authorization</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Range" title="en/Range">Range</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Referer" title="en/Referer">Referer</a></code></td>
+ <td>
+ <p>(请注意,在HTTP / 0.9规范中引入的正交错误必须在协议的后续版本中保留)</p>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Retry-After" title="en/Retry-After">Retry-After</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>Sec-Websocket-Extensions</code></td>
+ <td></td>
+ <td></td>
+ <td> <a class="external" href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07" title="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07">Websockets</a></td>
+ </tr>
+ <tr>
+ <td><code>Sec-Websocket-Key</code></td>
+ <td></td>
+ <td></td>
+ <td> <a class="external" href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07" title="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07">Websockets</a></td>
+ </tr>
+ <tr>
+ <td><code>Sec-Websocket-Origin</code></td>
+ <td></td>
+ <td></td>
+ <td> <a class="external" href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07" title="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07">Websockets</a></td>
+ </tr>
+ <tr>
+ <td><code>Sec-Websocket-Protocol</code></td>
+ <td></td>
+ <td></td>
+ <td> <a class="external" href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07" title="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07">Websockets</a></td>
+ </tr>
+ <tr>
+ <td><code>Sec-Websocket-Version</code></td>
+ <td></td>
+ <td></td>
+ <td> <a class="external" href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07" title="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07">Websockets</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Server" title="en/Server">Server</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Set-Cookie" title="en/Set-Cookie">Set-Cookie</a></code></td>
+ <td></td>
+ <td></td>
+ <td><a class="external" href="http://www.ietf.org/rfc/rfc2109.txt" title="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Set-Cookie2" title="en/Set-Cookie2">Set-Cookie2</a></code></td>
+ <td></td>
+ <td></td>
+ <td><a class="external" href="http://www.ietf.org/rfc/rfc2965.txt" title="http://www.ietf.org/rfc/rfc2965.txt">RFC 2965</a></td>
+ </tr>
+ <tr>
+ <td><code>Strict-Transport-Security</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Security/HTTP_Strict_Transport_Security" title="en/Security/HTTP Strict Transport Security">HTTP Strict Transport Security</a></td>
+ <td><a class="external" href="http://tools.ietf.org/html/draft-hodges-strict-transport-sec-02" title="http://tools.ietf.org/html/draft-hodges-strict-transport-sec-02">IETF reference</a></td>
+ </tr>
+ <tr>
+ <td><code>TCN</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>RFC 2295, §8.5</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/TE" title="en/TE">TE</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Trailer" title="en/Trailer">Trailer</a></code></td>
+ <td>
+ <p>列出将在消息正文之后在尾部块中传输的头。这允许服务器计算一些值,如Content-MD5:在传输数据时。请注意,Trailer:标头不得列出Content-Length :, Trailer:或Transfer-Encoding:headers。</p>
+ </td>
+ <td></td>
+ <td><a class="external" href="http://tools.ietf.org/html/rfc2616#section-14.40" title="http://tools.ietf.org/html/rfc2616#section-14.40">RFC 2616, §14.40</a></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Transfer-Encoding" title="en/Transfer-Encoding">Transfer-Encoding</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Upgrade" title="en/Upgrade">Upgrade</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_User-Agent.3a_header" title="https://developer.mozilla.org/en/HTTP/Content_negotiation#The_User-Agent.3a_header">User-Agent</a></code></td>
+ <td></td>
+ <td>for Gecko's user agents see the <a href="/en-US/docs/User_Agent_Strings_Reference" title="En/User Agent Strings Reference">User Agents Reference</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>Variant-Vary</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="en/HTTP/Content negotiation">HTTP Content Negotiation</a></td>
+ <td>RFC 2295, §8.6</td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Vary.3a_response_header" title="https://developer.mozilla.org/en/HTTP/Content_negotiation#The_Vary.3a_response_header">Vary</a></code></td>
+ <td>
+ <p>列出了用作Web服务器选择特定内容的条件的标头。此服务器对于高效和正确缓存发送的资源很重要。</p>
+ </td>
+ <td><a href="/en-US/docs/Web/HTTP/Content_negotiation" title="https://developer.mozilla.org/en/Content_negotiation">HTTP Content Negotiation</a> &amp; <a href="/en-US/docs/HTTP_Caching_FAQ" title="en/HTTP Caching FAQ">HTTP Caching FAQ</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Via" title="en/Via">Via</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/Warning" title="en/Warning">Warning</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/en-US/docs/Web/HTTP/Headers/WWW-Authenticate" title="en/WWW-Authenticate">WWW-Authenticate</a></code></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>X-Content-Duration</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Configuring_servers_for_Ogg_media" title="https://developer.mozilla.org/en/Configuring_servers_for_Ogg_media">Configuring servers for Ogg media</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>X-Content-Security-Policy</code></td>
+ <td></td>
+ <td>Using <a href="/en-US/docs/Security/CSP/Using_Content_Security_Policy" title="en/Security/CSP/Using Content Security Policy">Content Security Policy</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>X-DNSPrefetch-Control</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/Controlling_DNS_prefetching" title="En/Controlling DNS prefetching">Controlling DNS prefetching</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>X-Frame-Options</code></td>
+ <td></td>
+ <td><a href="/en-US/docs/The_X-FRAME-OPTIONS_response_header" title="en/The X-FRAME-OPTIONS response header">The XFrame-Option Response Header</a></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code>X-Requested-With</code></td>
+ <td>
+ <p>通常在值为“XMLHttpRequest”时使用</p>
+ </td>
+ <td></td>
+ <td>Not standard</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="注意">注意</h2>
+
+<div class="note">
+<p><strong>注意:</strong>{{Gecko ("5.0") }}不会发送带有Keep-Alive的请求头。以前的版本确实发送过,但格式并不正确,因此决定暂时删除它。{{ httpheader("Connection") }}或{{ httpheader("Proxy-Connection") }}报文首部仍然会发送,带着"keep-alive"的值。</p>
+</div>
+
+<h2 id="更多">更多</h2>
+
+<p><a href="http://en.wikipedia.org/wiki/List_of_HTTP_header_fields">维基百科上对HTTP首部的展示</a></p>