A user's request for content will generate a responseConsists of the headers and the body sent from a server responding to a request. If an origin server is returning a response, then this response will be sent to an edge server. The edge server will then forward the response to a client. from a server. This response consists of:
Identifies the network protocol and version (e.g., HTTP/1.1) used to transmit the response to the client. This protocol and version typically matches the one defined in the request. If an invalid protocol or version was requested, then the response will return a 505 HTTP Version Not Supported.
Indicates the status of the requested action as determined by the server that fulfilled the request.
This status code may be overridden through one of our security features (e.g., Rules Engine, Token-Based Authentication, Web Application Firewall, etc.).
Learn more about HTTP Status Codes.
The default conditions that will generate a common HTTP status code are described below.
HTTP Status Code | Description |
---|---|
200 OK |
Indicates that the requested content was delivered to an authorized user. HTTP Large/HTTP Small Only: By default, the response will be cached unless the asset’s headers specifically prohibit caching. ADN: By default, the response will not be cached. |
302 Found |
Indicates one of the following took place:
|
304 Not Modified |
Indicates all of the following:
|
403 Forbidden |
This status code is returned to a user in response to an unauthorized request. The requester will be denied access to the requested asset. A request for an asset protected by Token-Based Authentication is considered unauthorized when:
|
404 Not Found |
An origin server returns this status code when the requested asset was not found. |
504 Gateway Timeout |
An edge server returns this status code when it is unable to communicate with an origin server when trying to revalidate the requested asset. |
The response headers generated for content requested through our CDN describe the response provided by an edge server. By default, our edge servers will include:
Example:
The Last-Modified and ETag response headers determine whether our edge servers will be able to revalidateRefers to the process that occurs when a request for stale content requires that our edge servers check for a new version of the requested content on the origin server.staleIdentifies cached content whose TTL has expired. Our edge servers revalidate stale content with the origin server. This step ensures that the latest version of the requested content is served to the requester. content.
Common response headers are listed below.
Response Header | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Accept-Ranges |
Indicates whether a server can accept range requests. Default value: bytes The default value indicates that our servers can accept byte-range requests. |
||||||||
Cache-Control: max-age |
Indicates the maximum length of time that a request is considered fresh. An edge server can serve fresh content directly from cache without having to perform a revalidation with the origin server. Default value: 604800 The default value indicates that the max-age for the requested content is 7 daysMax-age is defined in seconds. 604800 seconds = 7 days. |
||||||||
Content-Type |
Indicates the media typeIdentifies/classifies the data contained in a file. (aka content type) for the response body. Sample media types are provided below.
|
||||||||
Date |
Indicates the date and time (GMT) on which the edge server returned a response. |
||||||||
Etag |
Indicates the entity tag (ETag) for the requested content. This ETag allows our edge servers to revalidate stale content. In other words, our edge servers will use ETag when checking with the origin server to see if there is a newer version of the requested content. |
||||||||
Expires |
Indicates the date and time (GMT) at which the response will be considered stale. By default, our edge servers must revalidate requests for stale content. |
||||||||
Last-Modified |
Indicates the date and time (GMT) at which the requested content was last updated. |
||||||||
Provides information about the server that fulfilled the request. Syntax (Customer Origin Server) If a cached version of the requested content is not found, then the customer origin server will provide a response.
Syntax (New Content & CDN Storage) The following syntax applies for requests to CDN storage that have not been previously cached: EOS (POP/IDIndicates a four digit alphanumeric system ID. This field is used solely for internal purposes.)
The terms used in the above syntax are defined below:
Syntax (Cached Content) The following syntax applies for requests for cached content: Platform (POP/IDIndicates a four digit alphanumeric system ID. This field is used solely for internal purposes.)
The terms used in the above syntax are defined below:
|
|||||||||
This response header is only returned when a staleIdentifies cached content whose TTL has expired. Our edge servers revalidate stale content with the origin server. This step ensures that the latest version of the requested content is served to the requester. response is served to the client. A stale response is typically served under the following conditions:
|
|||||||||
Vary |
Identifies the variant that defines whether cached content can be served for future requests. Key information:
The Accept-Encoding request header identifies the type of compression requested by the client. An edge server may deliver the requested content immediately if the cached asset matches the requested compression method. |
||||||||
Indicates that a cached version of the requested content was served directly to the requester by an edge server. This response header will be set to the following value:
|
|||||||||
Content-Encoding |
Indicates that a compressed version of the requested content was served to the requester. This response header will indicate the asset's compression type (e.g., gzip, deflate, bzip2, etc.). |
||||||||
Content-Length |
Indicates the size of the response body in octets. |
Use the Debug Cache Response Headers feature to add debug cache headers to the response.
Learn more.
Response headers can be viewed using a variety of tools, such as:
Chrome offers built-in developer tools through which you may view response headers.
To view response headers in Chrome
If you would like to submit this information to support personnel, right-click on the left-hand pane and then select the Save as HAR with content option. Attach the HAR file to your message.
Firebug is a free browser add-on for Mozilla Firefox.
To view response headers in FireFox
Fiddler is a free web debugging tool. Although it has a variety of uses, it can be used to submit a request and view the corresponding response from the server. This tool provides a history of the requests submitted during the current session. This history, along with the verbose nature of this tool, makes it a useful troubleshooting tool through which you can diagnose the root cause of your issue.
Use Wget, which is a command-line tool, to request content.
The following sample request will return header data
Use curl, which is a command-line tool, to request content.
The following sample request returns header data
Contains the data provided in response to the request.
Example
The response body for a GET request for a text file might look similar to the following:
Hello World!