Robin Rodricks
Robin Rodricks

Reputation: 113946

How to speeden up SWF load time?

I'm optimizing a Flash website in order to load as quickly as possible, and in certain edge cases the SWF takes upto 10 seconds to load. There are no external assets except for the SWF file, and the only JS is embedded into the HTML page.

As this trace shows, the SWF request is sent by the browser only after the DOMContentLoaded event fires, which takes 8 secs. In most cases the SWF starts loading in about 2 seconds.

load time

Is there a way to quicken the request latency? Currently the SWF is inserted with Javascript, using the SWFObject library, so only after the browser renders the HTML page does the JS execute and add the SWF tag into the webpage. What if I added the same SWF tag into the <head> section. Would this somehow preload the SWF causing the JS to get the SWF immediately when it executes later in the <body>?

Usually the rule of thumb in load-time optimization is to use as few requests (files) as possible. But the SWF file must be seperated from the HTML file. Or is there a way to embed it as base64 into the HTML, and have JS convert this into a file and load it as a Flash <object> tag instantly? I'm willing to try any tricks as long is its compatible/reliable with all browsers.

Specs:

Upvotes: 2

Views: 1219

Answers (1)

joshua
joshua

Reputation: 684

I blame the server, i gather its a shared hosting server...resources could be limited, even though you ping the server quickly the server then must navigate to where your website is on there hard disks..also other factors of bandwidth matter too...take into account not only your server provider but your provider, and other general congestion in between you and the US.Try a closer server...

I had this problem as i am based in Australia and i too had a US server...good at times but more or less unreliable, so i got a premium server in Australia in my main capital city(works perfect). Alot of web hosting providers offer free trials to test there speeds. See if this is an issue... might be a hassle but could help with your problem.

TEST: in the run enter (CMD) then type "ping yourwebsite.com"

results for my website are 20ms / www.parele.com.au (sydney based server Australia)

Upvotes: 1

Related Questions