HTTP Headers

Reference common HTTP request and response headers with security best practice guidelines.

AcceptRequest headers
Content types the client accepts
Accept: text/html, application/json
Accept-EncodingRequest headers
Content encodings the client accepts
Accept-Encoding: gzip, deflate, br
Accept-LanguageRequest headers
Natural languages the client accepts
Accept-Language: zh-CN, en;q=0.9
AuthorizationRequest headers
Authentication credentials
Authorization: Bearer <token>
Cache-ControlGeneral headers
Caching directives
Cache-Control: max-age=3600
Content-TypeEntity headers
Media type of the request body
Content-Type: application/json
Content-LengthEntity headers
Size of the request body (bytes)
Content-Length: 1234
Content-EncodingEntity headers
Content encoding
Content-Encoding: gzip
CookieRequest headers
Cookies sent to the server
Cookie: session=abc123
HostRequest headers
Target host of the request
Host: example.com
User-AgentRequest headers
Client information
User-Agent: Mozilla/5.0...
Content-Security-PolicyResponse headers
Content Security Policy
Content-Security-Policy: default-src 'self'
ETagResponse headers
Version identifier of the resource
ETag: "abc123"
LocationResponse headers
Redirect target URL
Location: https://example.com/new
ServerResponse headers
Server software information
Server: nginx/1.18.0
Set-CookieResponse headers
Sets a cookie
Set-Cookie: session=abc123; HttpOnly
Strict-Transport-SecurityResponse headers
HSTS, forces HTTPS
Strict-Transport-Security: max-age=31536000
X-Content-Type-OptionsResponse headers
Prevents MIME type sniffing
X-Content-Type-Options: nosniff
X-Frame-OptionsResponse headers
Prevents clickjacking
X-Frame-Options: DENY
X-XSS-ProtectionResponse headers
XSS protection
X-XSS-Protection: 1; mode=block

About HTTP Headers — Detailed Guide

Category: Network & HTTP 100% Browser-Local

The HTTP Headers Reference is an authoritative encyclopedia of standard HTTP headers covering general headers, request headers, response headers, and critical web security headers like CSP, HSTS, and CORS.

It provides syntax definitions, directive breakdowns, compatibility details, and best-practice deployment examples to harden websites against XSS, clickjacking, and data leakage. Powered offline in your browser, search operates with zero network delay.

#http #header #request #response

Key Features & Capabilities

  • Complete dictionary across request, response, representation, and security headers
  • In-depth blueprints for security policies: CSP, HSTS, CORS, and X-Frame-Options
  • Explicit syntax directives, supported tokens, and real-world web server configuration snippets
  • 100% client-side instant search filtering by header name or functional category

How to Use

  1. 1

    Type a header name (e.g., Cache-Control, Content-Security-Policy) into the search filter.

  2. 2

    Expand the entry to review formal syntax rules, security implications, and directive lists.

  3. 3

    Copy tested header definitions into your Nginx configuration, Cloudflare Workers, or backend middleware.

Common Use Cases

  • → Configuring browser and edge CDN caching hierarchies with precise Cache-Control directives
  • → Hardening web applications against injection and clickjacking with CSP and HSTS
  • → Diagnosing cross-origin resource sharing (CORS) header mismatches during API integrations

Related Tools

Frequently Asked Questions & Privacy

What is the difference between Cache-Control "no-cache" and "no-store"?

"no-cache" forces the client to revalidate with the server via conditional headers (ETag/304) before using cached content, whereas "no-store" prohibits caching entirely.

How does Strict-Transport-Security (HSTS) protect against MITM attacks?

HSTS instructs browsers to upgrade all connection attempts to HTTPS automatically, thwarting SSL-stripping man-in-the-middle exploits.