Hi all,
I've been testing client hints and I noticed that the viewport-width and dpr hints are not the same in all contexts. The page itself, first-party subresources, third-party subresources and third-party images all get potentially different values on the same device. I've tested this on Chome Dekstop 108 and Chrome Mobile 108.
Note that the viewport meta tag is not enabled by default, but you can enable it at the bottom (along with accept-ch, critical-ch and delegate-ch so you get all the hints).
In particular, the "First Party" and "Third-Party Image" tests do not match the other two. I don't know if this is a math problem (failing to consider the DPR, for example), or what.
The attached images show the results on my Samsung Galaxy S21 Ultra 5G and Chrome Desktop.
We rely on the accuracy of these values, particularly in the "Third-Party Image" context, to optimize images within our Image CDN.
According to my understanding, the values in my screenshots must be a bug since it is impossible to recompute the actual width of the viewport in pixels.
Thanks,
Steve Kamerman