AZ Tools

HTTP ヘッダリファレンス

開発

日常的に使う HTTP ヘッダのクイック検索 — 何をするか、リクエスト・レスポンス・両方向か、CORS・キャッシュ・セキュリティ・Cookie でどう組み合わさるか。カテゴリフィルタまたは名前・説明検索。

ヘッダ説明
DateTimestamp when the message was originated, in IMF-fixdate format.
ConnectionWhether the network connection stays open after the current exchange (keep-alive / close).
Transfer-EncodingHow the message body is encoded for transfer — chunked, compress, deflate, gzip, identity.
Content-TypeMedia type of the body (e.g. application/json; charset=utf-8).
Content-LengthSize of the body in bytes.
Content-EncodingCompression applied to the body (gzip, br, zstd).
Content-LanguageNatural language of the body (e.g. ko-KR).
Content-DispositionWhether the body is displayed inline or treated as an attachment to be downloaded.
HostDomain name of the server (required for HTTP/1.1).
User-AgentIdentifies the client software (browser, bot, library).
AcceptMedia types the client can handle (e.g. text/html, application/json).
Accept-EncodingContent encodings the client can decode (gzip, br).
Accept-LanguagePreferred languages of the client (e.g. ko, en;q=0.8).
RefererURL of the page that triggered the request — yes, misspelled in the spec.
AuthorizationCredentials — Basic, Bearer, Digest, etc.
RangeRequest only a portion of the resource (e.g. bytes=0-1023). Triggers a 206 response.
If-None-MatchConditional request — only return the resource if its ETag does not match.
If-Modified-SinceConditional request — only return the resource if changed since the given date.
OriginScheme + host + port of the page that initiated a CORS or fetch request.
ServerIdentifies the server software handling the request.
LocationTarget URL for redirects (3xx) or location of a newly created resource (201).
ETagOpaque identifier for a specific version of the resource — used with If-None-Match.
Last-ModifiedWhen the resource was last changed — used with If-Modified-Since.
Retry-AfterHow long to wait before retrying — used with 429 and 503.
WWW-AuthenticateChallenges the client to authenticate — sent with 401 responses.
VaryLists request headers that affect this response — caches use it to key entries.
AllowHTTP methods allowed on the resource — sent with 405 responses.
Access-Control-Allow-OriginWhich origin(s) may read the response — exact origin or `*`. Cannot be `*` with credentials.
Access-Control-Allow-MethodsMethods allowed on the resource for cross-origin requests — sent in the preflight response.
Access-Control-Allow-HeadersCustom request headers the client may include — sent in the preflight response.
Access-Control-Allow-CredentialsWhether the response can be shared when credentials (cookies, basic auth) are sent.
Access-Control-Max-AgeHow long the browser may cache the preflight response, in seconds.
Access-Control-Expose-HeadersResponse headers JavaScript may read (beyond the default safelist).
Access-Control-Request-MethodIn a preflight, the method the actual request will use.
Access-Control-Request-HeadersIn a preflight, the custom headers the actual request will include.
Cache-ControlCaching directives — max-age, no-store, public, private, immutable, etc.
ExpiresAbsolute date after which the response is stale — Cache-Control: max-age takes precedence.
PragmaLegacy caching control — `Pragma: no-cache` for HTTP/1.0 compatibility.
AgeHow long ago (seconds) the response was generated by the origin, per the proxy.
Strict-Transport-SecurityHSTS — forces future visits to use HTTPS, optionally including subdomains and preload.
Content-Security-PolicyCSP — restricts which sources of scripts, styles, frames, etc. the browser may load.
X-Frame-OptionsWhether the page may be embedded in a frame — DENY, SAMEORIGIN. Superseded by CSP frame-ancestors.
X-Content-Type-Options`nosniff` disables MIME sniffing — the browser must trust the declared Content-Type.
Referrer-PolicyControls how much of the Referer URL is sent with outgoing requests.
Permissions-PolicyOpts in/out of browser features (camera, microphone, geolocation, etc.) for the page and its frames.
Cross-Origin-Opener-PolicyCOOP — isolates the browsing context from cross-origin documents. Required for SharedArrayBuffer.
Cross-Origin-Resource-PolicyCORP — restricts which origins may load this resource.
CookieCookies the client sends back to the server.
Set-CookieAsks the client to store one or more cookies — attributes: Path, Domain, Max-Age, Secure, HttpOnly, SameSite.

使い方

  1. 検索ボックスにヘッダ名 (`cache-control`) またはキーワード (`cors`、`redirect`) を入力。
  2. カテゴリチップで絞り込み — 例:Security で CSP・HSTS・COOP を比較。
  3. 各行のコピーボタンでヘッダ名をコピー。

よくある質問

`Cache-Control` が両方向と表示される理由は?
`Cache-Control`・`Content-Type`・`Date`・`Connection` などの一部ヘッダはリクエストとレスポンスの両方で有効。テーブルでは `↔` で表示。
`Origin` と `Referer` の違いは?
`Origin` は scheme + host + port のみ — CORS と POST リクエストで送信。`Referer` は前のページの完全な URL で主に分析用途 — `Referrer-Policy` でどこまで漏らすか制御。
CORS preflight ヘッダはいつ使われる?
fetch が non-simple メソッド (`PUT`・`DELETE`) やカスタムヘッダを使うとき、ブラウザは先に `OPTIONS` preflight を送信。`Access-Control-Request-*` は preflight に、`Access-Control-Allow-*` は応答に。許可されれば実際のリクエストが続く。

関連ツール