Searchable HTTP headers reference organized by category. Covers request, response, caching, security, and CORS headers with syntax and examples.
Enter a header name in the search field, or filter by category (Request, Response, etc.) to find the header you need.
Check the header description, syntax format, and practical usage examples.
Click the copy icon to copy the header name to your clipboard for immediate use.
Content-Type: <media-type>[; charset=<charset>][; boundary=<boundary>]Content-Type: application/jsonJSON request or response bodyContent-Type: text/html; charset=utf-8HTML document with UTF-8 encodingContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryFile upload form dataContent-Length: <length>Content-Length: 348Response body is 348 bytesContent-Length: 0Empty body (e.g., DELETE response)Date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMTDate: Wed, 21 Oct 2015 07:28:00 GMTTimestamp of the responseConnection: keep-alive | closeConnection: keep-alivePersist the connection for further requestsConnection: closeClose the connection after the responseAccept: <MIME_type>/<MIME_subtype>[;q=<weight>], ...Accept: application/jsonAccept only JSON responsesAccept: text/html, application/xhtml+xml, */*;q=0.8Prefer HTML, accept anythingAccept: image/webp, image/png, */*Prefer WebP, then PNG imagesAuthorization: <auth-scheme> <credentials>Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...JWT Bearer token authenticationAuthorization: Basic dXNlcjpwYXNzd29yZA==HTTP Basic authentication (base64 encoded)Authorization: ApiKey my-api-key-hereCustom API key authenticationCookie: <cookie-list>Cookie: session_id=abc123Single session cookieCookie: theme=dark; lang=en; session=xyzMultiple cookies in one headerUser-Agent: <product>/<version> (<system-info>) <extensions>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36Chrome on Windows 10User-Agent: curl/7.68.0curl HTTP clientReferer: <url>Referer: https://example.com/page1User navigated from this pageReferer: https://www.google.com/search?q=exampleUser came from a search engineHost: <host>[:<port>]Host: example.comStandard hostname (port 80/443 implied)Host: api.example.com:8080Hostname with non-standard portSet-Cookie: <cookie-name>=<cookie-value>[; <attributes>]Set-Cookie: session=abc123; HttpOnly; Secure; SameSite=StrictSecure session cookieSet-Cookie: theme=dark; Max-Age=31536000; Path=/Persistent preference cookie (1 year)Set-Cookie: token=xyz; Domain=.example.com; SecureDomain-wide secure cookieLocation: <url>Location: https://example.com/new-pageAbsolute URL redirect (301/302)Location: /dashboardRelative path redirect after loginServer: <product>Server: nginx/1.18.0nginx web server versionServer: Apache/2.4.41 (Ubuntu)Apache web server on UbuntuWWW-Authenticate: <type> realm=<realm>[, <params>]WWW-Authenticate: Basic realm="My Site"HTTP Basic authentication promptWWW-Authenticate: Bearer realm="api", error="invalid_token"Bearer token authentication with errorCache-Control: <directive>[, <directive>]...Cache-Control: no-cache, no-store, must-revalidateDisable all cachingCache-Control: public, max-age=31536000Cache publicly for 1 year (static assets)Cache-Control: private, max-age=600Cache privately for 10 minutesETag: [W/]"<etag_value>"ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"Strong ETag (exact match required)ETag: W/"0815"Weak ETag (semantically equivalent)If-None-Match: [W/]"<etag_value>"[, [W/]"<etag_value>"]*If-None-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"Return 304 if ETag matches (cache hit)If-None-Match: *Succeed only if no existing resourceExpires: <http-date>Expires: Wed, 21 Oct 2025 07:28:00 GMTCache expires at this specific dateExpires: 0Resource already expired (no cache)Last-Modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMTLast-Modified: Wed, 21 Oct 2015 07:28:00 GMTFile was last changed at this timeContent-Security-Policy: <policy-directive>; ...Content-Security-Policy: default-src 'self'Allow resources only from same originContent-Security-Policy: default-src 'self'; script-src 'self' cdn.example.comAllow scripts from self and CDNContent-Security-Policy: default-src 'none'; img-src 'self' data:; style-src 'self'Strict policy allowing only self images and stylesX-Frame-Options: DENY | SAMEORIGINX-Frame-Options: DENYNever allow framing (clickjacking protection)X-Frame-Options: SAMEORIGINAllow framing only from the same originStrict-Transport-Security: max-age=<expire-time>[; includeSubDomains][; preload]Strict-Transport-Security: max-age=31536000Enforce HTTPS for 1 yearStrict-Transport-Security: max-age=63072000; includeSubDomains; preload2 years, including subdomains, HSTS preload eligibleX-Content-Type-Options: nosniffX-Content-Type-Options: nosniffDisable MIME type sniffingX-XSS-Protection: 0 | 1[; mode=block | report=<reporting-uri>]X-XSS-Protection: 1; mode=blockEnable XSS filter and block page if attack detectedX-XSS-Protection: 0Disable XSS filter (use with strict CSP)Permissions-Policy: <feature>=(<allowlist>)[, ...]Permissions-Policy: camera=(), microphone=(), geolocation=()Disable camera, microphone, and geolocationPermissions-Policy: geolocation=(self "https://trusted.example.com")Allow geolocation from self and trusted originAccess-Control-Allow-Origin: * | <origin>Access-Control-Allow-Origin: *Allow any origin (public API)Access-Control-Allow-Origin: https://example.comAllow only this specific originAccess-Control-Allow-Methods: <method>[, <method>]*Access-Control-Allow-Methods: GET, POST, OPTIONSAllow GET, POST, and preflight OPTIONSAccess-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONSAllow all common REST methodsAccess-Control-Allow-Headers: <header-name>[, <header-name>]*Access-Control-Allow-Headers: Content-Type, AuthorizationAllow Content-Type and Authorization headersAccess-Control-Allow-Headers: *Allow any request headersAccess-Control-Max-Age: <delta-seconds>Access-Control-Max-Age: 86400Cache preflight response for 1 dayAccess-Control-Max-Age: 3600Cache preflight response for 1 hourHTTP Headers Reference is a comprehensive cheat sheet covering frequently used HTTP request and response headers. Organized by category — general, request, response, caching, security, and CORS — each header includes a clear description, syntax format, and practical examples to help you implement them correctly.
Cache-Control is the modern standard and takes precedence when both are present. It provides fine-grained control with directives like max-age, no-cache, and no-store. Expires specifies an absolute date/time and is considered a legacy header, but is still useful for HTTP/1.0 compatibility.
ETag is an opaque identifier based on the content, while Last-Modified is a timestamp. ETags are more reliable because they change even if a file is regenerated with the same content at a different time. Last-Modified has 1-second precision, which can miss rapid updates.
Security headers like Content-Security-Policy, X-Frame-Options, and Strict-Transport-Security protect against common attacks such as XSS, clickjacking, and protocol downgrade attacks. They are a critical part of defence-in-depth security and are easy to add at the server or CDN level.
Simple requests (GET/POST with standard headers) are sent directly. Preflight requests (OPTIONS) are automatically sent by the browser for complex requests — those using PUT/DELETE, custom headers, or certain Content-Type values — to verify the server allows the cross-origin access before sending the actual request.
X-XSS-Protection is a legacy header targeting old browsers. Modern browsers have deprecated their XSS auditors. Instead, implement a strict Content-Security-Policy header, which provides far better protection. It is generally recommended to set X-XSS-Protection: 0 when using a strong CSP.