Thanks,
Thought it might be worth a try. So if there is no access to the fla/xml path, 
there is no way to prevent caching the xml file? Too bad. 
I found that even when you add the cache-buster to the actionscript call to a  
file, if you don't put the cache-buster in the swf embed, you will have caching 
problems with IE - I use a page counter occasionally, that calls a php file to 
update the page loads number, and use a cache-buster to load the php file via 
actionscript in the swf. But if I do not add the cache-buster to the swf embed 
code as well, IE will not load the php file/update the number correctly. So for 
recent IE iterations, you need both, I believe. 
http://jimbo.us/as3/count/

jimbo

*********** REPLY SEPARATOR  ***********

On 10/9/2008 at 9:19 AM Aran Rhee wrote:

Jimbo.

While this will ensure a new flash file, it will still load the same xml
file and cache it. Each file the browser requests / caches is totally
independent, so just because you have a new flash file, when a request goes
out to load the XML file, it will still come from cache if loaded before.

The code I supplied yesterday will work if you are able to supply the
location of the XML file externally. If the location / name of the XML file
is baked into the swf, then you have some issues as you have no real
control... You would have to do things like trying to control the caching
rules of certain files on the server-side, and if you are on shared hosting,
then you can forget that as an option...

Aran

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jimbo
Sent: Thursday, 9 October 2008 4:04 AM
To: [email protected]
Subject: Re: Prevent browser caching?


Try this in your swf embed code (example is 2.1 - dynamic embed, but you can
adapt it) it will load a fresh instance of the swf, and should load a fresh
instance of you xml file from the fresh swf:

<script type="text/javascript">
                        var flashvars = {};
                        var params = {};
                        var attributes = {};
                        swfobject.embedSWF("mySwfApp.swf?t=" + new
Date().getTime(), "mySwfApp", "550", "400", "9.0.0", false, flashvars,
params, attributes);
                </script>

*********** REPLY SEPARATOR  ***********

On 10/8/2008 at 9:58 AM banderberg wrote:

I don't have access to the original flash source code I don't think..
I only have a SWF file.

How can I do it then?

On Oct 7, 11:02 am, Rusty <[EMAIL PROTECTED]> wrote:
> In your flash file add a time stamp to your xml querystring.  Although
> the browser will cache your flash file, adding a timestamp will 'fool'
> the browser into thinking each time the xml file is loaded it is a new
> xml file.
>
> On Oct 7, 11:52 am, banderberg <[EMAIL PROTECTED]> wrote:
>
> > My flash object relies on XML files that change from time to time.
> > The problem is that browsers cache the flash object (or maybe just the
> > xml data?).
>
> > The result being that a user re-visiting the site won't see the
> > changes unless they clear their browser cache.
>
> > How can I use SWFObject to prevent browsers from caching my flash
> > object/data so that users always see the fresh data?

t






a


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to