<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 6, 2015, at 4:49 AM, Yoav Weiss <<a href="mailto:yoav@yoav.ws" class="">yoav@yoav.ws</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Wed, May 6, 2015 at 8:41 AM, Ryosuke Niwa<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:rniwa@webkit.org" target="_blank" class="">rniwa@webkit.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr" class=""><span class="">On Tue, May 5, 2015 at 11:35 PM, Yoav Weiss<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:yoav@yoav.ws" target="_blank" class="">yoav@yoav.ws</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><span class="">On Wed, May 6, 2015 at 8:14 AM, Ryosuke Niwa<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:rniwa@webkit.org" target="_blank" class="">rniwa@webkit.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr" class="">I do have the same concern over terse names. I don't see any point in saving 13 bytes by abbrebiating DevicePixelRadio as DPR.<div class=""><br class=""></div><div class="">In the case of ResourceWidth, we can't get this number until we trigger a layout. It doesn't seem desirable to slow down the page load speed by eagering triggering layout before loading each image. How do we plan to work around that?</div></div></blockquote><div class=""><br class=""></div></span><div class="">The resource width is planned to be based on the `sizes` attribute when available, and to fall back to the viewport width when it is not.</div><div class="">There are no plans to delay image loading waiting for layout, nor are there current plans to use the layout information once we have it, as that would introduce undesired raciness. </div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">Okay, thanks for the clarification. Perhaps the spec should explictily state that.</div><div class=""><br class=""></div></div></div></div></blockquote><div class=""> </div><div class="">Good idea. I'll file a spec issue.</div><div class=""><br class=""></div><div class="">Can I take the feedback here as a green light to implement (assuming that the header name concerns will be addressed)? Are there other blocking issues? Any other feedback?</div></div></div></blockquote></div><div class=""><br class=""></div>Some more questions/comments about RW:<div class=""><br class=""><div class="">- Is maybe-image-width-maybe-viewport-width a useful value? Perhaps there should be an always-present header for viewport width, and one for resource width that is present only when known? Though I’m not sure you can get a resource width even in the case where it’s known.</div><div class=""><br class=""></div><div class="">- The “sizes" attribute allows units which can’t be calculated down to px without doing a full style resolution, such as “em" and “ex”. The HTML spec even has an example using em units. But RW requires a number in CSS px units. How can this be reconciled with preloading happening before style is resolved?</div><div class=""><br class=""></div><div class="">- I don’t think making viewport-size-based decisions on the server side makes sense, because what do you do when the viewport is resized? Do you reissue the HTTP request for the image?</div><div class=""><br class=""></div><div class="">- The premise of this spec is to allow an image server to provide multiple representations when the markup can’t be changed, but sizes=“” is a new attribute, so old markup won’t already have it, and it’s normally only useful when doing client-size image selection with srcset=“”. In what case would it make sense to combine client-side and server side selection?</div><div class=""><br class=""></div><div class="">- What do you do when sizes=“” is changed on the client side? Do you have to issue a fresh HTTP request?</div><div class=""><br class=""></div><div class="">The fact that this is all unclear in the current Internet-Draft is part of what makes me think it’s not quite ready for prime time.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">More general questions that remain:</div><div class=""><br class=""></div><div class="">- Why require the server to opt into receiving these headers at all? Why not just always send?</div><div class="">- Why multiple headers instead of one that can contain multiple tokens? That would allow a clearer name while maintaining compactness.</div><div class=""><br class=""></div><div class="">General thoughts:</div><div class=""><br class=""></div><div class="">- I am kind of skeptical of doing image selection on the server side. The claimed use cases of not wanting to change the markup don’t make sense to me, since to make effective use of the spec as written you may need to change your markup. That said, if there is real-world demand for this approach, and if we can resolve some of the thorny technical issues, I won’t object to an implementation. Right now I’m still not fully convinced this technology is compatible with image preloading.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Maciej</div><div class=""><br class=""></div></div></body></html>