Re: [csswg-drafts] [css-device-adapt] @viewport is preloader-hostile

@bradkemper here's the issue, as I understand it:

When the parser loads the document, it may hit responsive images 
(srcset/<picture>). At that point, the parser wants to be able to kick
 off network requests for the right resource.  However, if there's an 
at-viewport rule in an external stylesheet (which, by definition, is 
async loaded) then you don't actually know what the final viewport 
settings will be. As such, the parser/preloader doesn't know which 
resource to go fetch. So either (a) you guess and may end up loading 
the wrong one (make 2 img request, waste data, and possibly flash of 
the wrong content), or (b) block and wait until you've loaded the 
external stylesheets (non-starter, PLT would get killed).

<meta> doesn't have this issue since it's inline in the HTML. 
Additionally, an inline style with at-viewport doesn't have the issue 
since it can be parsed synchronously.

-- 
GitHub Notification of comment by jacobrossi
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/258#issuecomment-230043273 
using your GitHub account

Received on Friday, 1 July 2016 20:43:51 UTC