W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Re: Media Queries and optimizing what data gets transferred

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Fri, 25 Jan 2013 15:28:15 +0000
To: <www-style@w3.org>
Message-ID: <gemini.mh6tn300vootc0n9u.stewart.brodie@antplc.com>
Fred Andrews <fredandw@live.com> wrote:

> 
> 
> > Date: Fri, 25 Jan 2013 14:20:49 +0200
> > From: hsivonen@iki.fi
> > To: www-style@w3.org
> > CC: ilya@igvita.com
> > Subject: Media Queries and optimizing what data gets transferred
> > 
> > Media Queries solve the problem of applying the style rules that are
> > relevant to the current state of the user agent. Media Queries don't
> > solve the problem of promising to avoid the transfer of data that is
> > not relevant to the state of the user agent at the time of the page
> > load.
> 
> Why is a 'promise' required?  Surely the UA can choose not to download
> resources that are not needed?

This isn't the fault of MQ per se - it's the CSSOM that requires the UA to
download ALL the stylesheets, regardless of whether they do, or can ever,
apply so that they can be made available for scripting.

It's a cost (bandwidth, time and memory) that we simply cannot afford in our
embedded devices, so we don't download the styleshet until the MQ becomes
true at a later point (if it ever does, which most of the time, it won't).
We could download it at a low priority, though the users (bill payers!)
would complain.


-- 
Stewart Brodie
Team Leader - ANT Galio Browser
ANT Software Limited
Received on Friday, 25 January 2013 15:28:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT