Search code examples
javascriptflashswfobject

Which swfobject.js file?


I downloaded SWFObject & it came with several files it has one swfobject.js file in the root dir & another in the "src" directory. The file size differs so I'm wondering which one I have to include in my header?


Solution

  • You can use either one. The swfobject.js file in the root is the minified (compressed) version, which has a smaller file size optimized for fast downloads. The tradeoff is that it isn't human-readable. The other swfobject.js file (/src/swfobject.js) is un-compressed and human readable in case you want to make modifications.

    A third option is to use the Google-hosted copy; all you'd need to do is use the Google URL src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" instead of the local file src="swfobject.js"