Bug 19530
Summary: | Safari/WebKit requests the same URL multiple times when Firefox/IE only requests it once | ||
---|---|---|---|
Product: | WebKit | Reporter: | Yusuf Goolamabbas <yusufg> |
Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Normal | CC: | ap, waikit |
Priority: | P2 | Keywords: | InRadar, NeedsReduction |
Version: | 525.x (Safari 3.1) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 | ||
URL: | http://faceoutblaze.dreamhosters.com/flashtest/test.html |
Yusuf Goolamabbas
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
I'm pretty sure that this is a duplicate, but I cannot find the original now...
Mark Rowe (bdash)
<rdar://problem/6007144>
Yusuf Goolamabbas
This behaviour is still observed in 10.5.4 and Safari 3.1.2
Yusuf Goolamabbas
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