Skip to content

Commit d057057

Browse files
angelampcostahyperlint-ai[bot]Oxyjun
authored
[Support] Updates 2xx page (#18832)
* Updates to 2xx page * Updates 2xx page * Update src/content/docs/support/troubleshooting/http-status-codes/2xx-success.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/support/troubleshooting/http-status-codes/2xx-success.mdx Co-authored-by: Jun Lee <[email protected]> --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> Co-authored-by: Jun Lee <[email protected]>
1 parent d3763a7 commit d057057

File tree

1 file changed

+56
-36
lines changed

1 file changed

+56
-36
lines changed

src/content/docs/support/troubleshooting/http-status-codes/2xx-success.mdx

Lines changed: 56 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,73 +5,93 @@ title: 2xx Success
55

66
---
77

8-
## Overview
8+
2xx status codes indicate success, meaning that the client's request was received, understood, and accepted by the server.
99

10-
**2xx** codes indicate success — meaning that a client's action was received, understood, and accepted.
10+
## 200 OK
1111

12-
***
12+
A 200 response indicates that the request has succeeded.
1313

14-
## 200 - OK
14+
### Common use cases
1515

16-
A **200** response means the request has succeeded.
16+
A 200 response is commonly used in the following scenarios:
1717

18-
The response payload will vary based on the request method:
18+
- GET requests: Returns requested resources such as webpages, images, or API data, along with relevant headers.
19+
- HEAD requests: Retrieves only headers corresponding to the requested resource, such as metadata. For example, file size or last modified date.
20+
- POST requests: Confirms successful processing of submitted data, such as form submissions, often with details about the result in the response body.
1921

20-
* **GET**: Headers and data corresponding to the requested resource
21-
* **HEAD**: Only headers corresponding the requested resource
22-
* **POST**: Status of or results obtained from the action
22+
A 200 response should ideally include a payload but is not required. Occasionally, an origin server may return a 200 response with zero content length. However, following RFC standards, a 204 response is recommended in such cases (except for the CONNECT method).
2323

24-
A 200 response **should** always have a payload, but is not required. Occasionally, an origin server may generate a 200 with a zero length. To adhere to RFC standards, the server should generate a 204 code (exception CONNECT).
24+
### Cloudflare-specific information
2525

26-
200 responses are cacheable by default for proxy servers and browsers. If not specified by Cloudflare [cache controls](https://support.cloudflare.com/hc/en-us/articles/202775670), [static resources](/cache/concepts/default-cache-behavior/) with this response will cache default for 2 hours at our edge.  
26+
By default, 200 responses are cacheable by proxy servers and browsers. If specific [cache controls](/cache/concepts/customize-cache/) are not defined, [static resources](/cache/concepts/default-cache-behavior/) with a 200 response are cached for two hours at Cloudflare's edge.
2727

28-
***
28+
## 201 Created
2929

30-
## 201 - Created
30+
A 201 response indicates the successful creation of one or more new resources. The server typically includes the location of the newly created resource in either the `Location` header or the request URI.
3131

32-
A **201** response means that the request was successful and one or more new resources were created.
32+
### Common use cases
3333

34-
Typically, you will find the new resource's location in the server's response (either the **Location** header or the request's URI).
34+
Creating a new resource in response to a POST request. For example, creating a new user, article, or record.
3535

36-
Refer to [RFC 7231](https://tools.ietf.org/html/rfc7231#section-7.2) for a discussion on validator header fields in a 201 response, such as **ETag** and **Last-Modified.**
36+
### Cloudlare-specific information
3737

38-
***
38+
Cloudflare forwards 201 responses without modification.
3939

40-
## 203 - Non-authoritative information
40+
For further information, refer to [RFC 7231](https://tools.ietf.org/html/rfc7231#section-7.2) for more details about validator headers, like **ETag** and **Last-Modified** in a 201 response.
4141

42-
A **203** response means that the request was successful but the response did not come directly from the origin server. The response was instead delivered by a proxy or intermediate server.
42+
## 203 Non-authoritative information
4343

44-
Servers use this response to tell a client that this resource has been cached at a proxy.
44+
A 203 response indicates that the request was successful, but the response did not come directly from the origin server. The response was instead delivered by a proxy or intermediate server.
4545

46-
Cloudflare does not cache 203 responses. For details about Cloudflare handles 203 responses, refer to [HTTP request headers](/fundamentals/reference/http-request-headers/).
46+
### Common use cases
4747

48-
***
48+
Servers use this response to tell a client that the resource was cached by a proxy server.
4949

50-
## 204 - No content
50+
### Cloudlare-specific information
5151

52-
A **204** response means that the request was successful but there is no content to return.
52+
Cloudflare does not cache 203 responses. For details about how Cloudflare handles 203 responses, refer to [HTTP request headers](/fundamentals/reference/http-request-headers/).
5353

54-
Commonly, servers provide this response when a document editor "saves" an action to the origin server. It lets the client know the save was successful.
54+
## 204 No content
5555

56-
204 responses never contain payloads and Cloudflare does not cache these responses.
56+
A 204 response indicates that the request was successfully processed, but there is no content to return in the response.
5757

58-
***
58+
### Common use cases
5959

60-
## 205 - Reset content
60+
This response is often used by servers to indicate that a document editor's save action to the origin server was completed successfully.
6161

62-
A **205** response tells the client to return to its previous state after a request. This response occurs after someone submits a form or other data and lets the client know to refresh the page or allow another submission.
62+
### Cloudflare-specific information
6363

64-
205 responses should never return a payload.
64+
204 responses never contain payloads, as specified by the HTTP standard, and Cloudflare does not cache these responses.
6565

66-
***
66+
## 205 Reset content
6767

68-
## 206 - Partial content
68+
A 205 response tells the client to return to its previous state after a request.
6969

70-
A **206** response means that the request was partially successful. Use this response to decrease latency when clients are processing larger files that might require split or interrupted downloads.
70+
### Common use cases
7171

72-
This request should also return either:
72+
This response occurs after a user submits a form or other data and they want to tell the client to refresh the page or allow a new submission.
7373

74-
* A partial payload that includes the **Content-Range** header that indicates the range and the data present in that range
75-
* A multipart payload that **does not** include the **Content-Range** header on the top-level HTTP response, but includes **Content-Type** and **Content-Range** headers on each individual part
74+
### Cloudflare-specific information
75+
76+
205 responses must not contain any payloads and Cloudflare does not cache these responses.
77+
78+
## 206 Partial content
79+
80+
A 206 response means that the request was partially successful, often used for serving large files in smaller chunks.
81+
82+
### Common use cases
83+
84+
This response is often used to decrease latency when clients are processing larger files that might require split or interrupted downloads. For instance, for streaming video or serving file ranges for progressive loading.
85+
86+
A 206 response includes either:
87+
88+
- Partial payload that contains a `Content-Range` header specifying the requested range and the data provided in the response.
89+
- Multipart payload that omits the `Content-Range` header at the top level but includes `Content-Type` and `Content-Range` headers for each part of the multipart response body.
7690

7791
For more details, refer to [RFC 7233 Section 4.1](https://tools.ietf.org/html/rfc7233#page-10).
92+
93+
### Cloudflare-specific information
94+
95+
Cloudflare handles 206 responses for range requests, but caching behavior may vary depending on the file type and origin settings.
96+
97+

0 commit comments

Comments
 (0)