Examples
The following syntax
http
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
indicates the order of priority:
| Value | Priority |
|---|---|
text/html and application/xhtml+xml |
1.0 |
application/xml |
0.9 |
*/* |
0.8 |
If there is no priority defined for the first two values, the order in the list is irrelevant. Nevertheless, with the same quality, more specific values have priority over less specific ones:
http
text/html;q=0.8,text/*;q=0.8,*/*;q=0.8
| Value | Priority |
|---|---|
text/html |
0.8 (but totally specified) |
text/* |
0.8 (partially specified) |
*/* |
0.8 (not specified) |
Some syntax, like the one of Accept, allow additional specifiers like text/html;level=1. These increase the specificity of the value. Their use is extremely rare.
More information
- HTTP headers using q-values in their syntax:
Accept,Accept-Encoding,Accept-Language,TE. - Header field definitions.