Ok, you have written a nifty application with an embedded SWF object. Now you would like to make the SWF object to reload itself because you know that meanwhile the Flash movie on the server has changed. You would dynamically rewrite the <div> ID block containing the SWF object using the same URL (because the server and the movie actually remains the same, only the contents has changed).

When you test your stuff you would notice that everything works well with Firefox 2.0 but that on IE6 and IE7 the old Flash movie has some super-glue and it will not go away.

Annoying Internet Explorer cache behavior has struck again.

One way out of this is to fool Internet Explorer to think that the URL has changed to make it reload the Flash movie. Simply add a random pattern as a phony GET argument into the URL. For example, if your SWF object’s URL is

http://www.myserver.com/mymovie.swf

change it dynamically, with a random pattern to

http://www.myserver.com/mymovie.swf?rand=7498763

Now the movie reload will work also with the Internet Explorer. Another story is will the remote server just ignore your attempt to pass unknown GET arguments.

(21/12/2007: Here’s an example of a Fb-site using the above method: (en) (fr) (fi)

About these ads