[whatwg] So if media-queries aren't for determining the media to be used what are they for?

Odin Hørthe Omdal odinho at opera.com
Wed May 16 06:30:00 PDT 2012

Oh, please do quote what you are answering. It's very hard to follow
such a conversation like this.

Matthew Wilcox <mail at matthewwilcox.com> wrote:
> If there was a way to do this in JS, we'd have found it. Every time we
> run up against the pre-fetch problem. In fact, it is only the
> pre-fetch problem that causes responsive images to be an issue at all.
> It'd be trivial to fix with JS otherwise.

I could be more clear. I believe this is what you are talking about:

I said:
> media queries is doing model 2. I suggest we find a way to do that with
> javascript. Maybe some form of deferring image loading at all, saying
> that "I will fetch image on my own". Then you can do the delayed image
> loading that would need to happen in a media query world.

When I say find a way to defer it, I mean spec a way to do it, and
implement that. Something like:

     <img defer src="blabla.jpg">

I understand the problem :-)

> Also, i don't think non-pixel based layouts can be easily dismissed.
> It's where the whole movement is going and already pixel based MQ are
> described as limited and not a best practice.

... But it doesn't work. Please read my emails, and come with
constructive technical feedback on why you think it *can* in fact work.
I can not see a method where that would work in an non-broken way.

Technical problems won't just magically go away by not acknowlegding

And I did find a way forward for the model 2, make a way to defer the
image load and find a way to load it. Maybe <picture> element should
always defer? It actually *has to* because it uses media queries, so in
fact, <picture> might be a solution for model 2 in the future.

But @srcset is solving the other part of the equation (model 1).
Odin Hørthe Omdal (Velmont/odinho) · Core, Opera Software, http://opera.com

More information about the whatwg mailing list