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

Re: Load event and <video>

From: Simon Pieters <simonp@opera.com>
Date: Mon, 23 Mar 2009 16:42:12 +0100
To: "Jonas Sicking" <jonas@sicking.cc>, "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: robert@ocallahan.org, public-html <public-html@w3.org>
Message-ID: <op.uq84kmu4idj3kv@zcorpandell.linkoping.osa>
On Fri, 20 Mar 2009 20:07:14 +0100, Jonas Sicking <jonas@sicking.cc> wrote:

> 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
> like:
>
> <script>
> 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";
> </script>
> <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.

Yes, Opera downloads immediately for new Image().


> 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
> happened.
>
> / Jonas

-- 
Simon Pieters
Opera Software
Received on Monday, 23 March 2009 15:42:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:33 GMT