What Accept-CH values are equivilent to User-Agent for identifying a browser?

1.8k views Asked by At

Chrome plans on deprecating and freezing its User-Agent header June, 2020. The User-Agent is useful when debugging certain errors from logs because many browsers have different quirks depending on the version. User-Agent is being deprecated in favor for Accept-CH and Sec-CH-UA-*.

What values do I need to put in Accept-CH in order for the browser to respond with the following user-agent information? What are the accompanying Sec-CH-UA-* headers?

  • Browser name and version.
  • OS name and version.
  • Architecture (32/64 bit x86, ARM, etc).
  • Is mobile.
1

There are 1 answers

3
akop On BEST ANSWER

I found this page.

  • Browsername and version
    Sec-CH-UA-Model and/or Sec-CH-UA-Full-Version
  • OS Name
    Sec-CH-UA-Platform and/or Sec-CH-UA-Platform-Version
  • Architecture
    Sec-CH-UA-Arch
  • Is Mobile
    Sec-CH-UA-Mobile

But keep in mind that the client hints are experimental.

Edit

To answer your question what you have to send to get the values from above:
Just remove the SEC-CH-UA--prefix, so your header looks like this

Accept-CH: UA, Full-Version, Platform, Platform-Version, Arch, Mobile