Re: Media Queries and optimizing what data gets transferred

On 1/25/13 10:09 AM, Fred Andrews wrote:
> Why is a 'promise' required?  Surely the UA can choose not to download
> resources that are not needed?

No, it can't, because the resources have an OM that is exposed to script.

Which means that UAs have to download them in case the page goes and 
tries to touch that OM: doing otherwise would require either having a 
null object when script comes looking (bad for web compat) or doing 
synchronous loads.

On the other hand, if the page explicitly opts into "I'm OK if this is 
not present in the OM sometimes" a UA is a lot more likely to be willing 
to not load the thing...

> Just learn how to write fluid webpages.

History suggests that any proposal that involves page authors doing more 
work than other options they have is doomed to failure, for what it's 
worth.  And I can't say I blame page authors for that.

-Boris

Received on Friday, 25 January 2013 16:07:59 UTC