14.10 Other Header Fields
Now we discuss about some other header fields.
14.10.1 Accept Header Field
Using the Accept, Accept-Charset, Accept-Encoding
, and Accept-Language
header fields, the client notifies of its capabilities in its request. Each of these header fields can contain several parameters separated by commas. These parameters, in every instance, can have a quality (q) associated with them, which can be stated after a semicolon. The quality is a number between 0
and 1
. The higher the quality of the property, the more it is preferred by the client and it is 1 (the default value is q=1)
. An asterisk can be used to specify all the possible choices of the property.
Using the Accept
header field, the client specifies supported media types. For example:
Accept: text/*;q=0.3, text/html, image/jpeg;q=0.7, model/vrml, */*;q=0.1
This code states that the client prefers:
- any text with quality
0.3
text/html
with quality1
image/jpeg
with quality0.7
model/vrml
with quality1
- any medium with...