W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] Implementation complexity with elements vs an attribute (responsive images)

From: Mathew Marquis <mat@matmarquis.com>
Date: Sun, 13 May 2012 12:21:39 -0400
Message-Id: <72E4B8BF-8644-4ED7-BDE8-8410B93312B2@matmarquis.com>
To: whatwg@lists.whatwg.org

On May 13, 2012, at 9:42 AM, Odin Hørthe Omdal wrote:
> 
>> Connection speed
>> As an extension of the iPad example above, it would also be
>> irresponsible to serve the high res image to users that do have a high
>> pixel density display but are not on a fast internet connection for
>> whatever reason. So you might write:
>> <picture alt="The new iPad">
>> <source src="lores.jpg">
>> <source src="hires.jpg" media="(min-resolution: 300dpi) and
>> (min-connection-speed: 1mbps)">
>> <img src="lores.jpg" alt="The new iPad">
>> </picture>
> 
> As I said, this is one of my big gripes with this proposal. I don't
> think this'll work satisfactorily, it puts the burden on figuring out
> what is correct for that user into the page author's control. That model
> skews the responsibility so that instead of only a few browser engines
> having to get it right, millions of web page authors have to get it
> right.

We’re speaking in theoreticals here, which is what makes it hard for me to wrap my head around it being anyone’s major gripe with either proposal. Maybe a bandwidth media query isn’t the solution? Maybe, when the time comes, we do rely on the UA to make that decision. Maybe there’s a user preference that could be set. This line of reasoning doesn’t speak for or against either approach, however.

> 
> AND they have to update their sites and mediaqueries when we get
> something new to optimize for. I don't think they will do that, based on
> how extremely big the problem with -webkit-prefixes are.
> 
> I've seen enough of the web to be sceptical.

The amount of “developers can never be trusted with this” sentiment I’ve heard from the members of this group is incredibly depressing.

When we get “something new to optimize for,” we start adding that thing going forward. The evolution of media queries—or, say, HTML5—hasn’t led to a need to constantly revisit every piece of client work a developer has ever produced. We’re speaking in terms of optimization because that’s what it is: incremental improvements to the way assets are loaded. As more become available, requests become more tailored.

> 
> 
> What if a the author doesn't write that min-connection-speed query
> there? And who is the author of a page to decide such things anyway?
> What about latency?  Should there be a max-latency: 10ms, there as well?
> What about cost? I have a fast line, but it costs money to download
> stuff, so I'd like the smaller pictures. What about if I have slow
> internet connection, but I'd want to print the page, thus getting the
> best version of the image? Or if I'm sitting with my new fancy hires KDE
> Tablet and loading your page in a background-tab, letting it render and
> be finished while I continue to read the page I'm on (the browser might
> very well want to load the highres picture then, even though the
> connection is slow, but with MQ, not that lucky).

I think this has has forked well into “should we have bandwidth available in a media query” territory. It’s a worthwhile topic for sure, but apart from being a minor and—again—purely speculative factor in considering an adaptive images approach, it is another conversation.


Mat Marquis
Received on Sunday, 13 May 2012 16:22:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT