- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 16 Sep 2013 13:33:54 -0700
- To: Andy Davies <dajdavies@gmail.com>
- Cc: Simon Pieters <simonp@opera.com>, Kornel Lesiński <kornel@geekhood.net>, www-style <www-style@w3.org>
On Mon, Sep 16, 2013 at 6:51 AM, Andy Davies <dajdavies@gmail.com> wrote: > 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). Oh good *lord* that's horrible. document.write is *verboten*. It's a terrible, terrible API that messes everything up. ~TJ
Received on Monday, 16 September 2013 20:34:42 UTC