What is the purpose of the “q” values in the HTTP “Accept” request header?

后端 未结 4 610
情歌与酒
情歌与酒 2020-12-24 06:46

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
         


        
4条回答
  •  天涯浪人
    2020-12-24 07:35

    To add to @Robin479's correct answer, the accept header in the question is equivalent to,

    Accept:
    text/html;q=1,
    application/xhtml+xml;q=1,
    application/xml;q=0.9,
    */*;q=0.8

    NOTE: The new line characters are just for better readability.

提交回复
热议问题