HTTP Header Reference

Shows common HTTP request and response header names and uses for developers building APIs, debugging browser traffic, or configuring web servers.

Runs locally in your browser
HTTP request headers
Header Meaning Example
AcceptMedia types the client can process in the response. Accept: text/plain, text/html
Accept-CharsetCharacter encodings the client accepts. It is obsolete in modern HTTP. Accept-Charset: iso-8859-5
Accept-EncodingContent codings the client can decode, such as gzip or br. Accept-Encoding: compress, gzip
Accept-LanguagePreferred response languages, optionally weighted with q values. Accept-Language: en,zh
Accept-RangesA response header, not normally a request header; it advertises supported range units. Accept-Ranges: bytes
AuthorizationCredentials used to authenticate the request to the origin server. Organisation
Cache-ControlRequest cache directives, such as no-cache or max-age. Cache-Control: no-cache
ConnectionControls hop-by-hop connection options. It must not be forwarded by proxies. Connection: close
CookieCookies previously stored for the target origin. Cookie: $Version=1; Skin=new;
Content-LengthSize of the request body in bytes. Content-Length: 348
Content-TypeMedia type and optional character encoding of the request body. Content-Type: application/x-www-form-urlencoded
DateDate and time when the request message was generated; rarely sent by browsers. Date: Tue, 15 Nov 2010 08:12:31 GMT
ExpectExpectations the server must meet, most commonly 100-continue. Expect: 100-continue
FromOptional contact address for the human user controlling the client. Rarely used. From: user@jsons.cn
HostTarget host and optional port. Required in HTTP/1.1 requests. Host: www.jsons.cn
If-MatchMake the request conditional on the current ETag matching one of the supplied values. If-Match: "Specific value"
If-Modified-SinceReturn the representation only if it changed after the supplied date. If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT
If-None-MatchMake the request conditional on the current ETag not matching a supplied value. If-None-Match: "Specific value"
If-RangeSend a range only when the validator still matches; otherwise send the complete representation. If-Range: "Specific value"
If-Unmodified-SinceApply the request only if the resource has not changed since the supplied date. If-Unmodified-Since: Sat, 29 Oct 2010 19:43:31 GMT
Max-ForwardsLimits how many proxies may forward a TRACE or OPTIONS request. Max-Forwards: 10
PragmaLegacy HTTP/1.0 cache-control field, commonly used as Pragma: no-cache. Pragma: no-cache
Proxy-AuthorizationCredentials used to authenticate the request to a proxy. Proxy-Authorization: Link to proxy authentication
RangeRequests one or more byte ranges from the selected representation. Range: bytes=500-999
RefererURL of the page that initiated the request. The historical field name is misspelled by specification. Referer: http://www.jsons.cn
TETransfer codings the client accepts, plus optional support for trailers. TE: trailers,deflate;q=0.5
UpgradeProtocols the client invites the server to switch to on the current connection. Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
User-AgentIdentifies the client software making the request. User-Agent: Mozilla/5.0 (Linux; X11)
ViaLists intermediaries that forwarded the request. Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
WarningObsolete field for additional cache warnings; removed from current HTTP specifications. Warning: 199 example.test "Miscellaneous warning"
HTTP response headers
Header Meaning Example
Accept-RangesRange units supported by the server, commonly bytes. Accept-Ranges: bytes
AgeSeconds the response has spent in a cache since it was generated or revalidated. Age: 12
AllowRequest methods supported by the target resource. Allow: GET, HEAD
Cache-ControlResponse caching directives, such as max-age, no-cache, private, or no-store. Cache-Control: no-cache
Content-EncodingContent coding applied to the response body, such as gzip or br. Content-Encoding: gzip
Content-LanguageNatural language or languages of the response representation. Content-Language: en,zh
Content-LengthSize of the response body in bytes. Content-Length: 348
Content-LocationURL for the specific representation contained in the response. Content-Location: /index.htm
Content-MD5Obsolete MD5 digest field for the message content. Use Digest or Content-Digest where supported. Content-MD5: MD5 Validation
Content-RangeByte range carried by a partial response and the complete representation size. Content-Range: bytes 21010-47021/47022
Content-TypeMedia type and optional character encoding of the response body. Content-Type: text/html; charset=utf-8
DateDate and time when the origin server generated the response. Date: Tue, 15 Nov 2010 08:12:31 GMT
ETagOpaque validator identifying the selected representation version. ETag: "Request variable entity label current value"
ExpiresDate and time after which a cached response is considered stale. Expires: Thu, 01 Dec 2010 16:00:00 GMT
Last-ModifiedDate and time when the origin believes the resource was last changed. Last-Modified: Tue, 15 Nov 2010 12:45:26 GMT
LocationURL used for redirects or to identify a newly created resource. Location: http://www.jsons.cn
PragmaLegacy HTTP/1.0 cache field. Cache-Control is preferred in modern responses. Pragma: no-cache
Proxy-AuthenticateAuthentication scheme and parameters required by a proxy. Proxy-Authenticate: Basic
refreshNon-standard refresh instruction supported by some browsers. Prefer an HTTP redirect where appropriate.
Refresh: 5; url= http://www.jsons.cn
Retry-AfterWhen the client should retry, expressed as a date or a delay in seconds. Retry-After: 120
ServerInformation about the origin server software. Detailed version disclosure can increase fingerprinting risk. Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
Set-CookieCreates or updates a cookie in the user agent. Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
TrailerNames fields that may appear in the trailer section of a chunked message. Trailer: Max-Forwards
Transfer-EncodingHop-by-hop transfer coding used to frame the message, commonly chunked in HTTP/1.1. Transfer-Encoding:chunked
VaryRequest fields a cache must consider when selecting a stored response. Vary: *
ViaLists intermediaries that forwarded the response. Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
WarningObsolete field for additional cache warnings; removed from current HTTP specifications. Warning: 199 Miscellaneous warning
WWW-AuthenticateAuthentication scheme and challenge parameters required by the origin server. WWW-Authenticate: Basic
Recent tools: