Much better approach! Now, my question is, what do people do to prevent caching of swf files themselves?
Here's the setup: I'm deploying a business app, and want all users to see the update to the SWF. However, I don't want to tell everyone to clear their cache. Should I just pass a version number to the swf request, to update to that point, ie - point to: $vers = "1.0.2"; $path = "/flash/myMovie.swf?vers=" . $vers; <object file=$path>...etc. Is there a best practice for this kind of thing? I'm also curious how this will apply to Module development in Flex. How do I make sure that people have current modules, without blasting their cache, every time? Thanks, -Scott On 3/14/07, Thomas Fowler <[EMAIL PROTECTED]> wrote:
I'm sure someone has already mentioned this but you could always append the date in milliseconds to the query string as well. Like so: var date : Date = new Date(); url:String = resource + "?d=" + date.UTC(); ----- Original Message ----- From: "slangeberg" <[EMAIL PROTECTED]> To: <[email protected]>; "Flashcoders mailing list" <[email protected]> Sent: Wednesday, March 14, 2007 10:52 AM Subject: [Flashcoders] Re: [flexcoders] Re: Caching problem > That'll work with any cache-busting you need to do. I use it in testing, > to > un-cache the swf file itself, when viewed on server. Ie: send rand var in > url and if it's present, pass it in to swf call (swfobject + php, here): > > var so = new SWFObject( "ProductBuilder.swf?rand=<?=$rand?>", > "product_builder", "100%", "100%", "9", "#FFFFFF"); > > Saves me the 'pain' of going through some menu to clear browser's cache, > not > to mention losing your browser's cache, in order to update one element! > > -Scott > > On 14 Mar 2007 08:44:42 -0700, Alex <[EMAIL PROTECTED]> wrote: >> >> Wow! O_O' Works flawlessly!! :-D >> >> Many thanks for that trick dude! >> >> --- In [email protected] <flexcoders%40yahoogroups.com>, >> slangeberg <[EMAIL PROTECTED]> wrote: >> > >> > With Flash, I've learned to do the lo-tech method of attaching >> random >> > numbers to the path. Simple, but it's been effective!: >> > >> > url:String = resource + "?rand=" + Math.floor(Math.random() * >> 100000); >> > >> > -Scott >> > >> > On 14 Mar 2007 08:07:52 -0700, Alex <[EMAIL PROTECTED]> wrote: >> > > >> > > Hi there! >> > > >> > > I have an xml file that needs to be loaded eventually using a >> > > URLRequest. I'm trying to avoid loading a cached file using these >> > > headers: >> > > >> > > urlRequest.requestHeaders.push(new URLRequestHeader("Cache- >> > > Control", "no-cache, no-store, max-age=0, must-revalidate")); >> > > urlRequest.requestHeaders.push(new URLRequestHeader >> > > ("Expires", "Fri, 30 Oct 1998 14:19:41 GMT")); >> > > urlRequest.requestHeaders.push(new URLRequestHeader >> > > ("Pragma", "no-cache")); >> > > >> > > It works ok in firefox and IE6.0.2900, but I still obtain a >> cached file >> > > in IE6.0.3790+ and IE7. >> > > >> > > Do I need to add any more headers? or what's the problem here? >> > > >> > > Thanks in advance >> > > >> > > >> > > >> > >> > >> > >> > -- >> > >> > : : ) Scott >> > >> >> __._,_.___ Messages in this topic >> < http://groups.yahoo.com/group/flexcoders/message/67849;_ylc=X3oDMTM3NXM3YjkzBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAM2Nzg1OARzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzExNzM4ODcwODIEdHBjSWQDNjc4NDk- >( >> 4) Reply (via web post) >> < http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJyN3ZkcTU0BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAM2Nzg1OARzZWMDZnRyBHNsawNycGx5BHN0aW1lAzExNzM4ODcwODI-?act=reply&messageNum=67858 >| >> Start >> a new topic >> < http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJmb24wbnUzBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzExNzM4ODcwODI- > >> >> Messages< http://groups.yahoo.com/group/flexcoders/messages;_ylc=X3oDMTJmbTIyZWJtBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNtc2dzBHN0aW1lAzExNzM4ODcwODI- > >> -- >> Flexcoders Mailing List >> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com >> [image: Yahoo! >> Groups]< http://groups.yahoo.com/;_ylc=X3oDMTJlOGthMmFwBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTE3Mzg4NzA4Mg-- > >> Change settings via the >> Web< http://groups.yahoo.com/group/flexcoders/join;_ylc=X3oDMTJndjhlbHRhBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNzdG5ncwRzdGltZQMxMTczODg3MDgy >(Yahoo! >> ID required) >> Change settings via email: Switch delivery to Daily >> Digest<[EMAIL PROTECTED]:+Digest >| >> Switch >> format to >> Traditional< [EMAIL PROTECTED]:+Traditional > >> Visit Your Group >> < http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJldGs4djh2BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNocGYEc3RpbWUDMTE3Mzg4NzA4Mg-- >| >> Yahoo! >> Groups Terms of Use <http://docs.yahoo.com/info/terms/> | Unsubscribe >> <[EMAIL PROTECTED]> >> Recent Activity >> >> - 121 >> New >> Members< http://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnajBuMzdqBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxMTczODg3MDgy > >> >> Visit Your Group >> < http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmajRlb2pvBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzExNzM4ODcwODI- > >> SPONSORED LINKS >> >> - Software development >> tool< http://groups.yahoo.com/gads;_ylc=X3oDMTJkYzBpc2N2BF9TAzk3MzU5NzE0BF9wAzEEZ3JwSWQDMTIyODYxNjcEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNzbG1vZARzdGltZQMxMTczODg3MDgy?t=ms&k=Software+development+tool&w1=Software+development+tool&w2=Software+development&w3=Software+development+services&w4=Home+design+software&w5=Software+development+company&c=5&s=152&g=2&.sig=-g7I-F8ruxPL8no8ZFAx0w > >> - Software >> development< http://groups.yahoo.com/gads;_ylc=X3oDMTJkbzY0cjJuBF9TAzk3MzU5NzE0BF9wAzIEZ3JwSWQDMTIyODYxNjcEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNzbG1vZARzdGltZQMxMTczODg3MDgy?t=ms&k=Software+development&w1=Software+development+tool&w2=Software+development&w3=Software+development+services&w4=Home+design+software&w5=Software+development+company&c=5&s=152&g=2&.sig=gr9mtAoKFJnQF06zjx1waw > >> - Software development >> services< http://groups.yahoo.com/gads;_ylc=X3oDMTJkczJubms3BF9TAzk3MzU5NzE0BF9wAzMEZ3JwSWQDMTIyODYxNjcEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNzbG1vZARzdGltZQMxMTczODg3MDgy?t=ms&k=Software+development+services&w1=Software+development+tool&w2=Software+development&w3=Software+development+services&w4=Home+design+software&w5=Software+development+company&c=5&s=152&g=2&.sig=ntjRNxtOdZ_jUSLfJPIkiw > >> - Home design >> software< http://groups.yahoo.com/gads;_ylc=X3oDMTJkYXU2Z3ZqBF9TAzk3MzU5NzE0BF9wAzQEZ3JwSWQDMTIyODYxNjcEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNzbG1vZARzdGltZQMxMTczODg3MDgy?t=ms&k=Home+design+software&w1=Software+development+tool&w2=Software+development&w3=Software+development+services&w4=Home+design+software&w5=Software+development+company&c=5&s=152&g=2&.sig=UKtw8jm7fEaJty2hcCVyFg > >> - Software development >> company< http://groups.yahoo.com/gads;_ylc=X3oDMTJkaDhoNGplBF9TAzk3MzU5NzE0BF9wAzUEZ3JwSWQDMTIyODYxNjcEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNzbG1vZARzdGltZQMxMTczODg3MDgy?t=ms&k=Software+development+company&w1=Software+development+tool&w2=Software+development&w3=Software+development+services&w4=Home+design+software&w5=Software+development+company&c=5&s=152&g=2&.sig=v7C6JKvvBLf0I6WC1FPTvA > >> >> Cool Websites >> >> Know a good >> site?< http://us.ard.yahoo.com/SIG=12j8t8ekd/M=493064.10322723.10977639.9706567/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1173894282/A=4438988/R=0/SIG=111nufaaj/*http://www.bix.com/contest/4746 > >> >> Share and vote >> >> on Bix.com! >> Search Ads >> >> Get new >> customers.< http://us.ard.yahoo.com/SIG=12ibeg5ss/M=493064.9803227.10510220.8674578/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1173894282/A=3848641/R=0/SIG=1312g85fq/*http://searchmarketing.yahoo.com/arp/srchv2.php?o=US2003&cmp=Yahoo&ctv=Groups2&s=Y&s2=&s3=&b=50 > >> >> List your web site >> >> in Yahoo! Search. >> Yahoo! Groups >> >> Start a >> group< http://groups.yahoo.com/start;_ylc=X3oDMTJwYjY4dDViBF9TAzk3MzU5NzE0BF9wAzMEZ3JwSWQDMTIyODYxNjcEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNuY21vZARzbGsDZ3JvdXBzMgRzdGltZQMxMTczODg3MDgy > >> >> in 3 easy steps. >> >> Connect with others. >> . >> >> __,_._,___ >> > > > > -- > > : : ) Scott > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
-- : : ) Scott _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

