prevent swf caching

I'm looking for a solution to prevent swf caching. I know about the solutions using meta tags and javascript, but in this situation the swf is placed in a content management system in which i don't have access to the meta tags, nor the ability to use javascript or any other server side language (php, asp, cf, etc...). Any ideas? would be really nice if a solution was available in actionscript. Lastly, I'm using as2. Thanks in advance for the help.
LVL 11
Tom RayAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rascalpantsCommented:

so you don't have any access to the embed code in the HTML?

I can't imagine a CMS not giving you the ability to append a query string to a SWF...


otherwise there is no way to use Flash or ActionScript to have a browser not cache a file...  basically, because the browser caches it in your temp before any ActionScript can run.



rp / ZA

0
Tom RayAuthor Commented:
Could you tell me more about the query string approach?
0
rascalpantsCommented:

that is just when you use something like the below... but you have to have Javascript or some other way of making a random number...

"file.swf?nocache=" + randomNumberHere

the best random number is using the date....  since it will never happen again.


rp / ZA
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

rascalpantsCommented:

just had someone give me a good way of doing it...

have a shell.swf load in your file...  and use the query string from within the SWF...  this is actually a great way of doing it, because you typically want a shell.swf loading in your main content so that you can use a preloader...

will that work for you?

rp / ZA
0
rascalpantsCommented:

if you need some code to load in the other SWF into the shell, take a look at the MovieClipLoader class...

http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002538.html

when you use loadClip()  just make sure to add a random number to the end of the SWF.


rp / ZA
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom RayAuthor Commented:
yeah we have been using the shell method for quite some time now, it works well. it just becomes inconvenient with multiple swf's of multiple sizes.

we also try and build as many swf's as we can with data from xml files then we can exercise the same method when calling the xml file in. that too works very well. and yes we use the date AND the time. some days we update content so often we need the time stamp too.

thanks for the confirmation on what i really already suspected all a long.

0
rascalpantsCommented:

I meant the Date object, not just 5/22/2009  I mean to the millisecond...   THAT will never be the same...


You know you could always have a very large shell.swf and have it in a DIV layer on top of everything, or in between if you need other stuff overlaid...  then just have the XML position the loaded in SWFs...

a CMS can be a real pain if you let it...

:)

rp / ZA
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.