IE + Flash uploading = Road to fail

Today I had come across a weird problem / bug with good old Internet Explorer. I have a custom file uploader created with ActionScript and works fine in pretty much every browser, even IE…well, if you only want to use it once.

The problem is, Internet Explorer ( bless its cotton socks ) doesn’t like you loading the same swf file into the document dynamically over and over again. It will meerly use a cached file, so whatever you inject into the Flash movie when its loaded is stored and IE will constantly use this movie until you close the browser.

The solution? Very simple…meery wack a timestamp on the end of the file you wish to include…like this :

'mymovie.swf?time=' + new Date().getTime();

Thus Internet Explorer will think its a completely new file and load that bad boy in again!

Once again IE has made me spend endless hours on pointless bulls**t.

Leave a comment

You must be logged in to post a comment.