What is q=0.5 in Accept* HTTP headers?

This is called a relative quality factor. It specifies what language the user would prefer, on a scale of 0 to 1, as can be seen from the HTTP/1.1 Specification, ยง14.4:

Each language-range MAY be given an associated quality value which represents an estimate of the user’s preference for the languages specified by that range. The quality value defaults to “q=1”. For example,

  Accept-Language: da, en-gb;q=0.8, en;q=0.7

would mean: “I prefer Danish, but will accept British English and other types of English.”

Leave a Comment