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

Re: Media Query Variables

From: Andy Davies <dajdavies@gmail.com>
Date: Mon, 16 Sep 2013 14:51:34 +0100
Message-ID: <CABbusAJLpS6jjUoo7i9h87uFxLo1dEt2gWvEYtbygFWBLo5fAQ@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: Kornel Lesiński <kornel@geekhood.net>, www-style <www-style@w3.org>
On 16 September 2013 14:20, Simon Pieters <simonp@opera.com> wrote:

> On Mon, 16 Sep 2013 12:02:53 +0200, Kornel Lesiński <kornel@geekhood.net>
> wrote:
>
>>
>> Browsers already schedule images to load with low priority. If a page has
>> other resources (JS, non-responsive images, frames/ads) to download it may
>> even keep network busy for long enough for the delay to be irrelevant.
>>
>
> I'm not convinced that it's irrelevant. If what you describe happens, and
> the main content images suffer from this problem, browsers could fill up
> the request queue with secondary images that don't, which would further
> delay the load of the main content images.
>
>
Pre-loader behaviour varies between browsers and not all browsers download
images with a low priority:

Last week I came across someone advocating this:

<script>
    var file = window.innerWidth < 1000 ? "mobile.css" : "desktop.css";
    document.write('<link rel="stylesheet" type="text/css"
href="css/'+file+'"/>');
</script>

In IE10, a page with this and six content images results in behaviour we
don't want - the images consume the network connections delaying the
download of the CSS (
http://www.webpagetest.org/result/130912_H2_46d26d330e547c00c94742766cb347c1/1/details/),
WebKit browsers download the CSS first (not checked Opera or Mozilla).

Andy
Received on Monday, 16 September 2013 13:52:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:34 UTC