| « Merry Christmas! | The basics of setting up a website » |
I've been having a nightmare with server caching issues today which seems to only be affecting swf files - problematic to say the least since I've been working on something that needs to deploy off a server and not being able to see changes as I dev has caused headaches.
I've found this workaround has worked nicely. Just add a random number as a token in your swfobject embed code:
<script type="text/javascript">
var ranNum = Math.floor(Math.random()*100000);
var flashvars = {
};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "true",
allowScriptAccess: "always",
bgcolor: "#888888"
};
var attributes = {
id:"NewProject"
};
swfobject.embedSWF("xmascard.swf?"+ranNum, "altContent", "500", "700", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>