Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When does a browser initialize flash?

I am working on optimizing a page that has Flash on it. I am using optimization practices like moving Javascript to the bottom to not block. Removing inline scripts. And minimizing HTTP requests with minified css and js.

The majority of the pages content is in the flash, so loading it as soon as possible is the goal. Currently there is a 2 ~ 3 second delay before the flash is even rendered (using firebug profiling)

I am wondering at what point in the page load does the browser start initializing flash on the page?

Is it once the DOM element containing the flash has been rendered?

Is it once the complete onload event has been fired?

I imagine it probably differs with each browsers as well.

like image 709
kevzettler Avatar asked Dec 15 '10 19:12

kevzettler


1 Answers

Use a direct embed in the HTML. Don't use swfObject or the JS that the Flash IDE provides. If you use JS, you have to wait for that file to load - and then chances are, the JS is attaching to the window.onload and not rendering the SWF until then.

like image 106
mwilcox Avatar answered Oct 02 '22 02:10

mwilcox