This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16830 - Provide a way to defer loading images until after the page has loaded
Summary: Provide a way to defer loading images until after the page has loaded
Status: CLOSED LATER
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 15:06 UTC by Josh Tumath
Modified: 2012-09-06 16:34 UTC (History)
6 users (show)

See Also:


Attachments

Description Josh Tumath 2012-04-23 15:06:13 UTC
The BBC updated their BBC News mobile website, recently. One of the ways they optimised it for mobile devices was by deferring loading images until after the page has loaded.

I haven't looked into how this is done in detail, but they used DIVs for placeholders in the positions where the images will go. For example:

<div class="delayed-image-load" data-src="http://static.bbci.co.uk/news/200/media/images/59388000/jpg/_59388680_59388679.jpg"></div>

After the page has loaded, the DIV is changed into an IMG element.

Clearly, this isn't very semantic, and wouldn't work at all if JavaScript is disabled. But they have a good reason for doing this, which is why I believe there is a need for a way of deferring the loading of images until after the page has been parsed. This could also be applied to other embedded content elements, like IFRAME and OBJECT.

The way I think this should be done is by using the DEFER attribute, which would work in the same way as it does in the SCRIPT element.
Comment 1 Odin Hørthe Omdal 2012-05-08 13:16:06 UTC
Lots of pages do this, even for normal web pages. Load (fadein) on scroll.

I think there was another bug for this. I believe it's a hint worth having. For painting it'd be nicer to actually have height/width set though.
Comment 2 contributor 2012-07-18 07:01:08 UTC
This bug was cloned to create bug 17842 as part of operation convergence.
Comment 3 Robin Berjon 2012-09-06 16:28:40 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:


   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Rationale:

This does indeed on the face of it seem like a potentially useful hint to provide. However it won't make the cut for 5.0 — I'm flagging it as LATER so that we are sure to keep it in mind and will be able to return to it, hopefully reasonably soon.
Comment 4 Josh Tumath 2012-09-06 16:34:44 UTC
I'm satisfied with this response.