flash cache
- Started
- Last post
- 17 Responses
- nografik
does anybody know how to refresh a SWF file? i've tried -
< meta http-equiv="Cache-Control" content="no-cache" >
but no luck!
- instantok0
you need to append the filename with a random variable to trick the browser into thinking it is loading a new file each time...usually people use a date and time stamp because it will always be different...
- instantok0
here is a source file for embedding a swf with a timestamp:
- nografik0
thanks instantok!
- JazX0
instantok, I love you! Just what I have been dying to find!
this site: http://www.pncgrowupgreat.com was having the same issue, not no mo!
WOO HOO!
- instantok0
cool...no problem...you may also want to note that if you are loading content swfs or xml in your movies that you will need to similarly append date/time stamps when you call those files...check this out for the actionscript:
- JazX0
actually yes, I am having issues with PDFs and XML.
What code in that article do I exactly need. I read that before and never could get it to work?
- instantok0
go to page 2 and read the "installing and using cachemanager" section...there is an extension to download which comes with demo files that show how to load jpgs, swfs, txt, and xml
- JazX0
myXML.load("tabs.xml?cachebuster... + new Date().getTime());
across the board? If I put in all the files I want to not have cache will that work?
I'll check out the .mxp file at any rate.
- instantok0
well depending if you are loading xml or using loadMovie the beginning bit is a tad different...but yeah you need to add that for each time you call an external file...caching will not affect your files after that...
- sodyPop0
go here - this will solve all you issues including xml caching.
http://proto.layer51.com/d.aspx?…
-cheers
- instantok0
the run local part of that solution is very nice...i forget if the one i linked has that...it's important because files with variables appended will not load locally while you are developing...which sucks...
- JazX0
so sodyPop just add that to my main swf bringing in my XML and external SWFs?
- instantok0
right JazX...every spot where an external file is loaded...
- JazX0
ok, actually I did this the wrong way, if you go through that site I made multiple SWFs be connected to a main SWF and then from those external SWFs I bring in XML data.
d*mn
- JazX0
http://www.pncgrowupgreat.com/le…
see how it differs a differnt HTML file holding it, but then again it might make make it easier if I use that JS you showed...
- instantok0
JazX...if your content is what needs to be updated and not the flash file itself then you only need to apply the cache fix where you load the xml...the javascript method will only prevent your swf from being cached, not the xml that the swf loads...
- sodyPop0
right :-)