javascript - What would cause Firefox to request a resource multiple times after executing an external script? -
i'm noticing unusual behavior in firefox when include image directly after call external script.
for example:
<html> <body> <script type="text/javascript" src='external.js'></script> <img src="/test.gif" border=0 width=1 height=1 > </body> </html>
"external.js" can @ all...even blank.
i notice when request test.gif results in 404 or 302, firefox makes request same resource after script has completed.
127.0.0.1 - - [29/apr/2011:16:22:22 -0400] "get /test.gif http/1.1" 404 507 127.0.0.1 - - [29/apr/2011:16:22:22 -0400] "get /test.gif http/1.1" 404 507
this behavior doesn't occur inline javascript, , have pipelining turned off, i'm it's not related that. seems odd behavior, or i'm missing not-so-obvious.
i'm using firefox 3.16 on ubuntu, verified firefox 4.0 on osx , firefox 3.16 on windows.
any ideas?
this due image prefetch (or more precisely image cache) in firefox not dealing non-2xx return codes.
in particular, 302 issue https://bugzilla.mozilla.org/show_bug.cgi?id=552605 , 404 issue https://bugzilla.mozilla.org/show_bug.cgi?id=648568
Comments
Post a Comment