Bugzilla – Bug 16830
Provide a way to defer loading images until after the page has loaded
Last modified: 2012-09-06 16:34:44 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.
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.
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.
This bug was cloned to create bug 17842 as part of operation convergence.
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:
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.
I'm satisfied with this response.