Why is Chrome sending sec-ch-ua and sec-ch-ua-mobile request headers although "Experimental Web Platform features" are disabled
Asked Answered
V

1

12

I have the situation with Chrome, tested with 87.0.4280.88, that in some cases Chrome will send sec-ch-ua and sec-ch-ua-mobile request headers, although chrome://flags/#enable-experimental-web-platform-features is set to "disabled".

For instance:

sec-ch-ua: "Google Chrome";v="87", " Not;A Brand";v="99", "Chromium";v="87"
sec-ch-ua-mobile: ?0

When this happens, the only way to get rid of these headers is to start Chrome with the parameter --disable-features=UserAgentClientHint.

Does someone have an explanation for this? As far as I understand, these features are still experimental and the specification in progress (https://wicg.github.io/ua-client-hints/).

Viscus answered 4/1, 2021 at 15:38 Comment(2)
Was looking everywhere for this: --disable-features=UserAgentClientHint thanks for pointing that out.Anatolian
note: that feature flag is gone now as a result of source.chromium.org/chromium/chromium/src/+/…. related if you want to disable client hints: https://mcmap.net/q/1012894/-is-there-a-way-to-suppress-sec-ua-headers-in-chrome/11107541Janitajanith
E
0

I couldn't find a list of features behind the "Experimental Platform Features" flag, but I assume it's more about experimental Chrome features than experimental web standards, so that this flag probably was never intended to disable client hints, the maturity or stability of the standard behind it notwithstanding. Experimental standards get implemented all the time with current browsers, since that's the only way to get web developers' feedback on the practical implications of the standard.

According to Chrome's Platform Status, client hints are enabled by default since Chrome 89 and seems to be a pre-requisite for the bigger issue of User-Agent string reduction, which is probably one of the reasons it has been implemented quickly.

Effusion answered 11/10, 2022 at 8:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.