W3C home > Mailing lists > Public > public-html@w3.org > March 2009

Re: Load event and <video>

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 20 Mar 2009 12:07:14 -0700
Message-ID: <63df84f0903201207k74b3bd84r989423f7167266b7@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: robert@ocallahan.org, public-html <public-html@w3.org>
On Thu, Mar 19, 2009 at 8:10 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Robert O'Callahan wrote:
>> Gecko doesn't download images at all for display:none but does (and delays
>> the load event) for visibility:hidden and zero-size images.
> Actually, we've downloaded for display:none since at least Gecko 1.8
> (Firefox 1.5).

We download the image as soon as the DOM element is created. On the
desktop this is required for expected behavior. Many sites do stuff

imgA = new Image();
imgA.src = "a.jpg";
imgB = new Image();
imgB.src = "b.jpg";
imgC = new Image();
imgC.src = "c.jpg";
imgD = new Image();
imgD.src = "d.jpg";
<img src="a.jpg" onmouseover="this.src='b.jpg'" onmouseout="this.src='a.jpg'">
<img src="d.jpg" onmouseover="this.src='d.jpg'" onmouseout="this.src='c.jpg'">

In fact, even tools like dreamweaver outputs code like this.

I could see the argument for 'cheating' on mobile, but it most likely
needs to be a SHOULD lever requirement that resources are pulled down
and cached, and that the load event is blocked until that has

/ Jonas
Received on Friday, 20 March 2009 19:08:10 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:43 UTC