Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Сазнај више

What would cause Firefox to request a resource multiple times after a long running script?

more options

I'm noticing some unusual behavior in Firefox when I include an image directly after a call to an external script which is long-running.

For example:

    <html>
    <body>
    
    <script type="text/javascript" src='external.js'></script>
    <img src="/test.gif" BORDER=0 WIDTH=1 HEIGHT=1 >
    
    </body>
    </html>


Contents of external.js:

    for(i=0; i<999999; i++){ ; }


I notice that when a request to test.gif results in a 404 or 302, Firefox makes another request for that same resource immediately after the 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 for inline javascript, and I have pipelining turned off, so I'm fairly certain it's not related to that. Seems like odd behavior, or I'm just missing something not-so-obvious. Any ideas?

I'm noticing some unusual behavior in Firefox when I include an image directly after a call to an external script which is long-running. For example: <pre><nowiki> <html> <body> <script type="text/javascript" src='external.js'></script> <img src="/test.gif" BORDER=0 WIDTH=1 HEIGHT=1 > </body> </html> </nowiki></pre> <br /> Contents of external.js: <pre><nowiki> for(i=0; i<999999; i++){ ; } </nowiki></pre> <br /> I notice that when a request to test.gif results in a 404 or 302, Firefox makes another request for that same resource immediately after the 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 for inline javascript, and I have pipelining turned off, so I'm fairly certain it's not related to that. Seems like odd behavior, or I'm just missing something not-so-obvious. Any ideas?

Измењено од стране cor-el

Сви одговори (1)

more options

This forum focuses on end-user support. You can find more web development help on the mozillaZine Web Development board. Separate forum, separate registration. Please note the tips in the Sticky Post at the top of the forum before posting.