I have made a http request using Firefox.Now the request header shows the following:
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
The Accept
header list is first split at ,
then at ;
for additional parameters per entry. So, the list in your example splits down to text/html
, application/xhtml+xml
, application/xml;q=0.9
and */*;q=0.8
.
The q=
parameter on each entry indicates to the server the degree of preference for that media-type. It defaults to its maximum value of 1
, if it is missing (like in the first 2 entries). The last entry of */*;q=0.8
indicates to the server, that eventually any content-type would be acceptable but would be less preferable than the others listed. Otherwise, the server might decide to send no content at all, because the client would not "accept" it anyway.