kb/data/developer.mozilla.org/en-US/docs/Glossary/HTTP_header-0.md

12 KiB

title chunk source category tags date_saved instance
HTTP header - Glossary | MDN 1/3 https://developer.mozilla.org/en-US/docs/Glossary/HTTP_header reference web, html, css, javascript, documentation 2026-05-05T05:33:46.179421+00:00 kb-cron

MDN HTML HTML: Markup language

HTML reference

HTML guides

Markup languages

CSS CSS: Styling language

CSS reference

CSS guides

Layout cookbook

JavaScriptJS JavaScript: Scripting language

JS reference

JS guides

Web APIs Web APIs: Programming interfaces

Web API reference

Web API guides

All All web technology

Technologies

Topics

Learn Learn web development

Frontend developer course

Learn HTML

Learn CSS

Learn JavaScript

Tools Discover our tools

About Get to know MDN better

Blog

  1. Glossary
  2. HTTP header

HTTP header

An HTTP header is a field of an HTTP request or response that passes additional context and metadata about the request or response. For example, a request message can use headers to indicate its preferred media formats, while a response can use header to indicate the media format of the returned body. Headers are case-insensitive, begin at the start of a line and are immediately followed by a ':' and a header-dependent value. The value finishes at the next CRLF or at the end of the message. The HTTP and Fetch specifications refer to a number of header categories, including:

  • Request header: Headers containing more information about the resource to be fetched or about the client itself.
  • Response header: Headers with additional information about the response, like its location or about the server itself (name, version, …).
  • Representation header: Metadata about the resource in the message body (e.g., encoding, media type, etc.).
  • Fetch metadata request header: Headers that provide information about the context in which the request is made.

A basic request with one header: Redirects have mandatory headers (Location): A typical set of headers: Note: Older versions of the specification referred to:

  • General header: Headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.
  • Entity header: Headers containing more information about the body of the entity, like its content length or its MIME-type (this is a superset of what are now referred to as the Representation metadata headers)

In this article

See also