diff options
Diffstat (limited to 'files/zh-cn/web/http/status/308/index.html')
| -rw-r--r-- | files/zh-cn/web/http/status/308/index.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/status/308/index.html b/files/zh-cn/web/http/status/308/index.html new file mode 100644 index 0000000000..882a5836ea --- /dev/null +++ b/files/zh-cn/web/http/status/308/index.html @@ -0,0 +1,49 @@ +--- +title: 308 Permanent Redirect +slug: Web/HTTP/Status/308 +tags: + - 响应状态码 + - 重定向 +translation_of: Web/HTTP/Status/308 +--- +<div>{{HTTPSidebar}}</div> + +<p>在 HTTP 协议中, <strong>308 Permanent Redirect</strong>(永久重定向)是表示重定向的响应状态码,说明请求的资源已经被永久的移动到了由 {{HTTPHeader("Location")}} 首部指定的 URL 上。浏览器会进行重定向,同时搜索引擎也会更新其链接(用 SEO 的行话来说,意思是“链接汁”(link juice)被传递到了新的 URL)。</p> + +<p>在重定向过程中,请求方法和消息主体不会发生改变,然而在返回 {{HTTPStatus("301")}} 状态码的情况下,请求方法有时候会被客户端错误地修改为 {{HTTPHeader("GET")}} 方法。</p> + +<div class="note"> +<p>一些 Web 应用可能会将 308 Permanent Redirect 以一种非标准的方式使用以及用作其他用途。例如,Google Drive 会使用 308 Resume Incomplete 状态码来告知客户端文件上传终止且不完整。<sup><a href="https://developers.google.com/drive/v3/web/manage-uploads#resumable">[1]</a></sup></p> +</div> + +<h2 id="状态">状态</h2> + +<pre class="syntaxbox">308 Permanent Redirect</pre> + +<h2 id="标准">标准</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">标准</th> + <th scope="col">标题</th> + </tr> + <tr> + <td>{{RFC("7538", "308 Permanent Redirect" , "3")}}</td> + <td>The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("http.status.308")}}</p> + +<h2 id="更多可见">更多可见</h2> + +<ul> + <li>{{HTTPStatus("301")}} <code>Moved Permanently</code></li> + <li>{{HTTPStatus("302")}} <code>Found</code>, the temporary redirect</li> +</ul> |
