You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@igrigorik During a discussion with a big Web site, they had this context.
They send different image resolutions to different devices.
They need to know it before the image call (so at the initial HTML request)
window.devicePixelRatio is not working and client Hints for Image HTTP Request is too late. I guess they built the URI in the template on the server side at the initial request.
Do you think client hints would be able to address this use case?
The text was updated successfully, but these errors were encountered:
Client Hints plans to solve exactly this. DPI is relatively easy to ascertain, however image size is much more difficult because the browser's look-ahead pre-parser wants to start downloading images before it's loaded CSS (i.e. before it knows how big the image needs to be).
Your best bet for now is to use picture/srcset and request image sizes/dpi based on CSS style media queries (which are based on viewport width), which is definitely an improvement on UA sniffing.
PTAL at the discussions in httpwg/http-extensions#306 and httpwg/http-extensions#307... we're working towards a solution to enable CH signals on the navigation requests there, which will cover the use case above.
(closing this, let's continue on httpwg issues linked above)
@igrigorik During a discussion with a big Web site, they had this context.
window.devicePixelRatio
is not working and client Hints for Image HTTP Request is too late. I guess they built the URI in the template on the server side at the initial request.Do you think client hints would be able to address this use case?
The text was updated successfully, but these errors were encountered: