RE: Media Queries and optimizing what data gets transferred

Dear Boris,

It would appear that allowing the UA to not load these resource and to
return null when accessed them via the CSSOM would address some
of these issues?

If there is really a lot of script out there that would break if a null was
encountered then perhaps a meta element could be added to flag the
new behavior and the old could be deprecated?

Many web browsers allow the user to choose not to download image
resources, so are these a problem too?

Is this just an issue for the loading of the style sheets, or are other
resources affected?

Is there are good reason why the style sheets could not all be bundled
into one resource to avoid the issue?  Is some more CSS support needed
to allow this?

The Client Hints proposal would appear to go much further than just
addressing the issue of the loading of the style sheets?

cheers
Fred

> Date: Fri, 25 Jan 2013 11:07:25 -0500
> From: bzbarsky@MIT.EDU
> To: www-style@w3.org
> Subject: 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:58:14 UTC