<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25798</bug_id>
          
          <creation_ts>2014-05-19 08:08:02 +0000</creation_ts>
          <short_desc>&lt;img&gt; should maybe cache broken images</short_desc>
          <delta_ts>2019-03-29 20:58:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#img-load</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>d</cc>
    
    <cc>ian</cc>
    
    <cc>johns</cc>
    
    <cc>mike</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106312</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-05-19 08:08:02 +0000</bug_when>
    <thetext>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/the-video-element.html

Comment:
&lt;img&gt; should maybe cache broken images
If an &lt;img&gt; fetches something that fails to decode as an image, the spec
doesn&apos;t put it in the &quot;list of available images&quot;. Maybe we should still store
a key in that case and the data being a special value indicating a broken
image. This allows setting e.g. .src to something known-broken to fail
immediately instead of end up fetching the resource again.

Posted from: 210.95.255.149 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 OPR/21.0.1432.48 (Edition Next)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106616</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-21 20:23:59 +0000</bug_when>
    <thetext>What do browsers do? I doubt they put anything in the list; it would mean that if you fix the server, the browser refuses to try again anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106701</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-05-23 10:41:47 +0000</bug_when>
    <thetext>I think they refetch.

What I&apos;d like to avoid is repeatedly refetching the same resource that is known to be broken, at least at the scope of one document. For instance if a document has two &lt;img&gt;s that point to the same URL (and the first one completes fetching before the second one is seen).

What I have in mind now is having a separate list that just stores the keys and always respects HTTP cache semantics and doesn&apos;t allow copying entries between documents. So reloading a document would always refetch even if the resource allows caching.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106735</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-23 19:53:33 +0000</bug_when>
    <thetext>I strongly recommend just speccing what browsers do and not trying to fix it. There&apos;s almost zero chance that there&apos;s anything you can change here that wouldn&apos;t cause some site to break, since this stuff is almost two decades old.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107130</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-06-02 14:09:14 +0000</bug_when>
    <thetext>Actually at least Firefox 26 does cache the broken response. I made a mistake in my previous testing which prevented HTTP caching.

http://w3c-test.org/submissions/996/html/semantics/embedded-content/the-img-element/update-the-image-data/set-src-idl-same-value-broken-cacheable.html

But this doesn&apos;t necessarily need a new list, it could be explained by the HTTP cache I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107923</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-06-17 07:32:52 +0000</bug_when>
    <thetext>https://bugzilla.mozilla.org/show_bug.cgi?id=648568</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129689</commentid>
    <comment_count>6</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2019-03-29 20:58:50 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/issues/4480</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>