Inconsistent viewport-width and dpr

99 views
Skip to first unread message

Steve Kamerman

unread,
Dec 16, 2022, 5:06:21 PM12/16/22
to blink-dev
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.

Here's the test page that I've written: https://cute-easy-flag.glitch.me/

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
chrome-galaxy-s21.png
chrome-desktop.png

Mike Taylor

unread,
Dec 16, 2022, 5:18:34 PM12/16/22
to Steve Kamerman, blink-dev
Hi Steve,


thanks,
Mike
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/26b38f6a-6ccc-4311-ae92-465c251526adn%40chromium.org.


Steve Kamerman

unread,
Dec 17, 2022, 4:55:24 PM12/17/22
to Mike Taylor, blink-dev
Sure, no problem!
--

Steve Kamerman

Chief Operating Officer

Co-Founder | ImageEngine & ScientiaMobile

817-504-4744
st...@scientiamobile.com
imageengine.io

Reply all
Reply to author
Forward
0 new messages