It really depends on your server.. if you have apache its quite easy to setup @http://www.askapache.com/htaccess/mod_rewrite-fix-for- caching-updated-files.html
On Oct 8, 5:19 pm, "Aran Rhee" <[EMAIL PROTECTED]> 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 > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
