#615: TAG Specification review for viewport height client hint

Visit on Github.

Opened Mar 3, 2021

Ya ya yawm TAG!

I'm requesting a TAG review of Viewport Height Client Hint

Currently, Responsive Image Client Hints provide a way for origins to obtain the viewport’s width. However, no such attribute exists for viewport height. We’ve observed that to optimize the loading of content that appears in viewport, it is essential for the origins to adapt HTML response based on viewport height as well. Current methods of doing that include content-negotiation through the User-Agent string, but that is suboptimal as it’s indirect, and doesn’t cover all platforms. We’d like to propose adding a new image hint Sec-CH-Viewport-Height (similar to the existing Sec-CH-Viewport-Width). Similar to other client hints, origins would be able to register the opt-in for viewport-height client-hint via Accept-CH header, and receive the attribute value as part of HTTP request headers. This would enable origins to e.g., inline all the content that’s expected to appear in the viewport, or avoid lazy-loading it, optimizing height-constrained images in the absence of the layout height of the image, support server-side automated art direction ensuring that the whole image is always visible above the fold on height-constrained devices.

Further details:

  • [Yes] I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: [please provide]
  • The group where the work on this specification is currently being done:
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue):
  • Major unresolved issues with or opposition to this specification: n/a
  • This work is being funded by: Google

You should also know that: n/a

We'd prefer the TAG provide feedback as (please delete all but the desired option):

💬 leave review feedback as a comment in this issue and @-notify [@tarunban, @yoavweiss, @ryansturm]

Discussions

2021-03-15

Minutes

Peter: this is a small delta - and there is already a width ch.

Yves: I reviewed - i am not happy with client hints in general but apart from that i think it's fine.

Yves: not dure having a precise number here is useful - wondering if some fuzziness is expected or not.

Ken: I left a comment.

Peter: Spec says it shoould be the window's inner height.

Yves: can we close it with "it won't harm" but neither good or bad?

Dan: could say "ambivalent".

Ken: I don't think we need to block.

Yves: let's close.

Dan: +1

*closed