Skip to content

Don’t cache my swf files!

I often have issues where ‘dumb browsers’ cache my published swf files and when they dynamically populate they don’t always update.

This is SUPER annoying and I have found a solution.

I will demonstrate the technique with a LoadsVars example

var nc = Math.floor(random(1000000) / random(1000)); var send_lv:LoadVars = new LoadVars(); send_lv.sendAndLoad(_root.siteURL+"profile.php?action=showallimages&nc="+nc, result_lv, "POST");
Code language: JavaScript (javascript)

So let me describe what is happening here.

The really ‘dumb browsers’ like IE7 in this case decide that seeing as the URL in question has the exact same name, it will be clever and just use the last version it saw and be totally lazy and not attempt to get the data again. But the really stupid part about this is that most of the time the results are DYNAMIC and will always return a different result.

See also  Limited numeric input in flash actionscript 2 textfield
Notify of
1 Comment
Oldest Most Voted
Inline Feedbacks
View all comments
12 years ago

La idea excelente, es conforme con Ud.

Would love your thoughts, please comment.x