Bug 19530 - Safari/WebKit requests the same URL multiple times when Firefox/IE only requests it once
Summary: Safari/WebKit requests the same URL multiple times when Firefox/IE only reque...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://faceoutblaze.dreamhosters.com/...
Keywords: InRadar, NeedsReduction
Depends on:
Blocks:
 
Reported: 2008-06-12 20:28 PDT by Yusuf Goolamabbas
Modified: 2009-05-12 21:13 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Goolamabbas 2008-06-12 20:28:23 PDT
Hi, My colleague and I have constructed a test page which uses swfobject to incorporate a SWF file into an HTML page. The purpose of this test page is to load the same swf files multiple times into different divs and see if browsers make a single request or make multiple requests

The test page has multiple links via either use raw <embed> tags or swfobject api calls via loop unrolling, in a loop. We also use a mechanism which we term as preload wherein we have a simple Actionscript on the first frame of the swf file which calls out to a javascript callback after it finishes loading in the main page. We found this to be an appropiate workaround for IE6/IE7 for it not to make multiple requests

This is the actionscript used in the swf file

_root.stop();
this.onEnterFrame = function(){
        this.bytes_txt.text = _root.getBytesLoaded() + "/" +
_root.getBytesTotal();
        if(_root.getBytesLoaded() == _root.getBytesTotal()){
                this.bytes_txt.text = "done";
                _root.gotoAndStop(2);
                getURL("javascript: preloadfinish();");
                delete this.onEnterFrame;
                }
        }


We find that when we use Safari 3.1 on Mac OSX 10.5.3, it makes multiple requests to bring in the same swf file. This was observed via the Web Inspector as well as via HTTPScoop <http://www.tuffcode.com/>

Firefox 2 as well as Firefox 3 only make one request. It seems to remember that it made a request to the URL and thus doesn't fire it out again

We've tried with both swfobject 1.5 as well as swfobject 2.0

SWFObject 1.5: http://blog.deconcept.com/swfobject/
SWFObject 2.0: http://code.google.com/p/swfobject/

Test URL using SWFObject 1.5

http://faceoutblaze.dreamhosters.com/flashtest/test.html

Test URL using SWFObject 2.0

http://faceoutblaze.dreamhosters.com/flashtest2/test.html
Comment 1 Alexey Proskuryakov 2008-06-12 22:01:53 PDT
I'm pretty sure that this is a duplicate, but I cannot find the original now...
Comment 2 Mark Rowe (bdash) 2008-06-13 14:58:35 PDT
<rdar://problem/6007144>
Comment 3 Yusuf Goolamabbas 2008-07-07 17:04:04 PDT
This behaviour is still observed in 10.5.4 and Safari 3.1.2
Comment 4 Yusuf Goolamabbas 2008-12-15 20:43:07 PST
Still not fixed as of 10.5.6 and Safari 3.2.1

Version 3.2.1 (5525.27.1)

Also tested with WebKit nightly (r39293) and shows the same effect of multiple requests for the same content. 

Can't determine if this is a bug in CFNetwork or in WebKit