Hi
We have hundreds of flash charts on our site.
When a flash file is updated (over written by new file)99%
of the time the updated information shows up on the browser.
When one does not update, refreshing does not help, you have to delete the browser cache, which of course is not a solution.
Stopping the html or php from caching does not help either.
I found on a flash forum a script that is supposed to rename the flash file with a random number.
Below is a test script I put in and the flash works OK, but when I look at the flash file in my browser cache it still has the same name, maybe its working correctly. I’m unsure of a way to test it. I am not sure what is really happening with the #2 and # 3 URL’s in the script.
The first URL is the location of the original file.
The script seemed to call for a copy of the original file so I created a flashcache dir.
Can someone tell me if this script is doing what it is supposed to
or maybe there is another way.
The script below is my adaptation of the sample I found which is father down.
Thanks
donbmjr
<script type=”text/javascript”>
<!–
document.write(‘<OBJECT classid=”clsid?27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”
document.write(‘<PARAM NAME=movie VALUE=”* 99999) + ‘”> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> ‘);
document.write(‘<EMBED src=”
document.write(‘</OBJECT>’);
//–>
</script>
Link of the test page
[url]http://www.theinsidegroove.com/charts/04finishes/johnson-jimmie.html
Script I found
Do a javascript routine to randomise the name of the flash movie when it is called on the page
here’s some example code that I use to prevent caching:
Code:
<script type=”text/javascript”>
<!–
document.write(‘<OBJECT classid=”clsid?27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”
document.write(‘<PARAM NAME=movie VALUE=”* 99999) + ‘”> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> ‘);
document.write(‘<EMBED src=”
document.write(‘</OBJECT>’);
//–>
</script>
Note that whenever I call the path to the flash movie i do a ?variable=random number between 1 and 9999
this ensures that each time I load the page a new version of the flash movie will have to be downloaded in the browser cache