PDA

View Full Version : Caching of Swf's



NSRAM
May 18th, 2005, 07:56 AM
Hi,

i'm working on a website, where in i've swf's embedded into the pages, and now I wanna know Is there any ways to avoid Swf's being downloading to the client system? If yes, pls let me know asap.

thanks in advance

rhamej
May 18th, 2005, 03:03 PM
You can not control the caching, but you can add something that when the swf loads it will append a random number to the swf everytime so it forces the browser to re-download it every time.

NSRAM
May 19th, 2005, 03:10 AM
You can not control the caching, but you can add something that when the swf loads it will append a random number to the swf everytime so it forces the browser to re-download it every time.

thanks for the reply rhamej,

the problem is we dont want the files to be cached to the client's sys.
we jus wants our files to play and close without leaving a trace in the client sys...

Jman
May 19th, 2005, 03:57 AM
Hi,

If you are loading the swf from within your flash movie you can do this-



loadMovie ("myMC.swf?nocache=" + new Date().getTime(), "myMCHolder");


or instead of "myMCHolder" you could load it into a level by substituting the level number and leaving off the "".

You can also do this in the html file using javascript which is pretty similar to the code above.

Hope this helps,
Jman

rhamej
May 19th, 2005, 11:12 AM
What you said is basically what I described above. It just appends a new date to the end of the swf file name every time forcing the browser to re-download the swf everytime they visit the site. But that swf still goes to the temp files. This is not what he wants.

rhamej
May 19th, 2005, 11:23 AM
I found this to confuse you more :p
http://www.kirupa.com/forum/showthread.php?t=25852&page=1&pp=15&highlight=preventing+cache