aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/status/204
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/http/status/204
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/http/status/204')
-rw-r--r--files/zh-cn/web/http/status/204/index.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/status/204/index.html b/files/zh-cn/web/http/status/204/index.html
new file mode 100644
index 0000000000..a5606e9f31
--- /dev/null
+++ b/files/zh-cn/web/http/status/204/index.html
@@ -0,0 +1,47 @@
+---
+title: 204 No Content
+slug: Web/HTTP/Status/204
+tags:
+ - '204'
+ - HTTP
+ - HTTP Status Code
+ - 响应状态码
+ - 成功响应
+translation_of: Web/HTTP/Status/204
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>HTTP <strong><code>204 No Content </code></strong>成功状态响应码,表示该请求已经成功了,但是客户端客户不需要离开当前页面。默认情况下 204 响应是可缓存的。一个 {{HTTPHeader("ETag")}} 标头包含在此类响应中。 </p>
+
+<p>使用惯例是,在 {{HTTPMethod("PUT")}} 请求中进行资源更新,但是不需要改变当前展示给用户的页面,那么返回 204 No Content。如果创建了资源,则返回 {{HTTPStatus("201")}} <code>Created</code> 。如果应将页面更改为新更新的页面,则应改用 {{HTTPStatus("200")}} 。</p>
+
+<h2 id="状态">状态</h2>
+
+<pre class="syntaxbox">204 No Content</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Title</th>
+ </tr>
+ <tr>
+ <td>{{RFC("7231", "204 No Content" , "6.3.5")}}</td>
+ <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</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.204")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/HTTP/Methods">HTTP request methods</a></li>
+</ul>