Skip to content
On this page

Response Headers

Introduction

HTTP response headers are key-value pairs sent by a server to a client (such as a web browser or API client) as part of an HTTP response. These headers provide additional information about the response, such as the server's identity, the content type, caching directives, and more.

Response headers are essential for controlling how clients handle the received content, manage caching, and ensure proper communication. Below is a comprehensive list of commonly used HTTP response headers along with a brief description of their purpose.

Common response headers

Below is a table of common HTTP response headers and info about their usage:

Header NameDescription
Accept-RangesIndicates the server's support for range requests.
Access-Control-Allow-OriginSpecifies the origin(s) allowed to access the resource (CORS).
AgeIndicates the time the resource has been cached on the server.
AllowLists the HTTP methods supported by the server.
Cache-ControlSpecifies caching directives for the response.
ConnectionSpecifies options for the network connection.
Content-EncodingSpecifies the encoding used for the response body.
Content-LanguageSpecifies the language(s) of the response content.
Content-LengthIndicates the size of the response body in bytes.
Content-LocationSpecifies an alternate URL for the returned content.
Content-DispositionIndicates how the content should be handled (e.g., as an attachment).
Content-RangeIndicates the range of data included in the response.
Content-TypeSpecifies the media type of the response body.
DateIndicates the date and time the response was generated.
ETagProvides an identifier for a specific version of a resource.
ExpiresSpecifies the date and time after which the response is considered stale.
Last-ModifiedIndicates the date and time the resource was last modified.
LocationSpecifies a URL to redirect the client to.
PragmaProvides backward compatibility with HTTP/1.0 caches.
Proxy-AuthenticateRequests authentication from the client for a proxy.
RefreshSpecifies a delay after which the browser should refresh the page.
Retry-AfterIndicates how long the service should wait before retrying a request.
ServerIdentifies the server software used to handle the request.
Set-CookieSets an HTTP cookie in the client's browser.
Strict-Transport-SecurityEnforces secure (HTTPS) connections to the server.
Transfer-EncodingSpecifies the encoding used to transfer the response body.
VarySpecifies the headers used to determine the response.
ViaIndicates intermediate proxies the request passed through.
WWW-AuthenticateRequests authentication from the client.
X-Content-Type-OptionsControls how the browser should interpret the Content-Type.
X-Frame-OptionsControls whether the response can be framed.
X-XSS-ProtectionEnables cross-site scripting (XSS) filtering.

Released under the MIT License.