The http X- Header Directive


Headers that are prefixed with "X-" need special consideration as they have been deprecated.

Headers with the prefix X- were conventionally proprietary custom headers, but this was deprecated in 2012, as it was realised that these were causing a number of issues.

Historically, "X-" headers where used to indicate "eXperimental" (or "eXtension"), this meant that they could be handled appropriately, or ignored entirely where not implemented.

In this case the name of the header directive was identifying its status (experimental) as well as it's purpose, this causes issues when being adopted either formally or informally into a standard:

  1. If an experimental x- header were to be adopted into a standard and it was decided to removed the "x-" prefix then for a period you would end up with a standard that required both (for example "x-new_header" and "new_header") having to be accommodated, and in addition a plan for accommodating the change.

  2. In some cases x- headers become ubiquitous (ie. found and used everywhere), hence they have been co-opted into the standard but in the "experimental" form.

The resolution to these issues as defined by the Internet Engineering Task Force (IETF) are as follows:

Creators of New Parameters:

  1. "Should assume that all parameters they create might become standardized, public, commonly deployed, or usable across multiple implementations."
  2. "Should employ meaningful parameter names that they have reason to believe are currently unused."
  3. "Should NOT prefix their parameter names with "X-" or similar constructs."

See this Internet Engineering Task Force (IETF) RFC for a full history, and details about deprecating the "X-" Prefix.

;