Re: Media Query Variables

On 13 September 2013 13:15:08 David Newton <david@davidnewton.ca> wrote:
>
> > 3. Not all applications need preload scanner. For example app.ft.com is a 
> JS-based offline app. It needs responsive images, but not preload scanner. 
> It would be shame if it had to use worse syntax and less maintainable 
> solution to enable optimization it does not need.
>
> That sounds like an edge case to me,

JS applications generating markup are not an edge case any more (personally 
I think they're overused, but they're popular nevertheless).

> and not enough reason to throw out an optimization that could benefit a 
> huge number of other sites.

That's incorrect. Media Query Variables don't throw out preload scanner 
optimization.

MQ variables can work either with or without preload scanner, so sites that 
want it can benefit from it.
If you use MQ vars in <style> in head you get same performance as any 
<meta>-based solution.

The only question is should we make syntax deliberately incompatible with 
external stylesheets to *force* authors to be friendly to preload scanner 
and deny them option of more convenient maintenance.

I think authors should have a choice. Applications that don't need preload 
scanner should not be forced to bear the cost of it.
The important bit is that MQ vars work with preload scanner when authors 
want them to.

And HTTP/2 may make the issue moot, so we may give up nice syntax and easy 
maintenance for nothing.

-- 
regards, Kornel

Received on Friday, 13 September 2013 15:19:32 UTC