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 26350 - If the list of available images is being used to de-dup requests from the same page, shouldn't this (step 2) happen before the fetch is complete? Or do I misunderstand its purpose?
Summary: If the list of available images is being used to de-dup requests from the sam...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Simon Pieters
QA Contact:
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 05:35 UTC by contributor
Modified: 2015-09-16 12:44 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2014-07-16 05:35:10 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html
Multipage: http://www.whatwg.org/C#img-load
Complete: http://www.whatwg.org/c#img-load
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
If the list of available images is being used to de-dup requests from the same
page, shouldn't this (step 2) happen before the fetch is complete? Or do I
misunderstand its purpose?

Posted from: 2001:44b8:418e:2700:b8f9:3dc4:ab0c:9512
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.77.4 (KHTML, like Gecko) Version/7.0.5 Safari/537.77.4
Comment 1 Mark Nottingham 2014-07-28 04:21:53 UTC
This is regarding the "list of available images" BTW; it seems to operate as a cache of sorts (or at least a set function to avoid duplication), but I'm not completely sure.
Comment 2 Simon Pieters 2014-08-04 13:49:00 UTC
If the page requests a new <img src> while a previous <img src> is still fetching the same URL, the spec invokes "fetch" again, but that is allowed to reuse the same fetch. So the list of available images is not used in that case.

The list of available images is used when the image is completely available, to enable sync switching of images and to avoid re-downloading images in the same document that don't allow caching per HTTP.

I could clarify this in a note if that would help.
Comment 3 Mark Nottingham 2014-08-04 23:45:59 UTC
Hi Simon,

That would be helpful. Where is the text allowing reuse of a fetch-in-progress? I couldn't find it.

Thanks
Comment 4 Simon Pieters 2014-08-05 14:15:01 UTC
See http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#fetch step 11. I don't know where it is stated in the new Fetch spec though (HTML doesn't use the new Fetch yet).
Comment 6 Mark Nottingham 2014-08-06 01:48:22 UTC
Thanks!