View Full Version : Viewers do not see updates flash unless they delete cache
CoDaXe
06-01-2005, 02:51 AM
Viewers do not see updated flash unless they delete cache
Well yes taht is the problem?
Is there a way i can fix it using html manipulations?
Or do i really have to give my file a new name everytime i update.
Flash Gordon
06-01-2005, 03:43 AM
there is a way not to make it load from the cache. I don't know how but that would be one option.
oldnewbie
06-01-2005, 03:55 AM
That may depend on each user's browser cache settings... But you can always append a specific random number to your .swf's name in your .html, to force the browsers to always get a fresh file from the server.
oldnewbie
06-01-2005, 04:04 AM
Or.... You might want to have a look at these...
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14743
http://www.mnot.net/cache_docs/
farafiro
06-01-2005, 11:22 AM
http://www.mnot.net/cache_docs/nice link, thanks
merlinvicki
06-03-2005, 12:30 PM
Those docs on caching never work.......
Even I had this problem since i have a website which is information based, and is updated quite frequently. I had to make the user download the flash directly from server and not the cache.
After several failed attempts this javascript code helped me out:
<script type="text/javascript">
<!--
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="990" height="540" id="home.swf" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="home.swf?r=' + Math.round(Math.random() * 99999) + '"> <PARAM NAME="quality" VALUE="high"> <param name="menu" value="true" /> <param name="wmode" value="transparent" /> ');
document.write('<EMBED src="home.swf?r=' + Math.round(Math.random() * 99999) + '" quality=high menu="true" WIDTH="990" HEIGHT="540" NAME="home.swf" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');
//-->
</script>
You can also take a look at the code on my website. Its better organised. Just change the filenames, height and width properties.
:)
farafiro
06-05-2005, 06:59 AM
merlinvicki
the MM's solution should work perfectly, just note this
Note: the Pragma: No-Cache header does not work with Internet Explorer 5. Microsoft recommends using the Cache-Control header, instead. See Microsoft's article (http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP) on this subject.
merlinvicki
06-06-2005, 10:10 AM
More from MIcrosoft:
http://support.microsoft.com/kb/222064/
Pragma: no-cache prevents caching only when used over a secure connection. A Pragma: no-cache META tag is treated identically to Expires: -1 if used in a non-secure page. The page will be cached but marked as immediately expired.
I also think u need to turn off caching from the IIS for this purpose...
Have u ever tried it yourself. I dont know what I was doing wrong when I was trying this but the page cached everytime and used to load from the temp on reloads.
After a lot of research I first used the above javascript to create a random temp file everytime my website was reloaded. Then I found out about people turning off javascript so then I just converted the same into a PHP. Its running fine now with no implied promises....
:rolleyes:
garion1
11-10-2005, 09:33 AM
Hi merlinvicki
Thanks for the javascript. Could you please tell me exactly where in my HTML code it should go and if it should replace any existing code.
I am publishing my HTML file with Flash.
Thanks
oldnewbie
11-10-2005, 01:22 PM
You'd replace the Object & Embed tags (changing the .swf's name and all appropriate values in the movie's parameters... width & height, color, etc...) in your .html (within the <body> tag) with what Merlinvicki posted above...
Or you could use a first preloader only movie to load your "website.swf", appending a number to your loadMovie action, in the manner described further above.
merlinvicki
11-10-2005, 03:13 PM
Hi merlinvicki
Thanks for the javascript. Could you please tell me exactly where in my HTML code it should go and if it should replace any existing code.
I am publishing my HTML file with Flash.
Thanks
If you are not accustomed to writing HTML: Publish your html and post here. I will make the modifications for you.
Regards
garion1
11-10-2005, 09:29 PM
Hi merlinvicki
Thanks. I am having trouble here. All I get now is the attached empty scrollpane!? on my screen. I published the HTML file with Dreamweaver.
Please check my code...
__________________________________________________ _____________
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Mymovie</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body>
<div align="center">
<script type="text/javascript">
<!--
document.write('<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="766" height="604" id="Mymovie.swf" ALIGN="middle">');
document.write('<PARAM NAME=movie VALUE="Mymovie.swf?r=' + Math.round(Math.random() * 99999) + '"> <PARAM NAME="loop" value="false" /> <PARAM NAME="menu" value="false" /> <PARAM NAME="quality" VALUE="high" /> ');
document.write('<EMBED src="Mymovie.swf?r=' + Math.round(Math.random() * 99999) + '"WIDTH="766" HEIGHT="604" NAME="Mymovie.swf" ALIGN="middle" loop="false" menu="false"
quality="high" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');
//-->
</script>
</div>
</body>
</html>
__________________________________________________ _____________
merlinvicki
11-11-2005, 05:59 AM
Hi merlinvicki
Thanks. I am having trouble here. All I get now is the attached empty scrollpane!? on my screen. I published the HTML file with Dreamweaver.
Please check my code...
__________________________________________________ _____________
Hi, Test this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Mymovie</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<div align="center">
<script type="text/javascript">
<!--
document.write('<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="766" height="604" id="Mymovie.swf" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="Mymovie.swf?r=' + Math.round(Math.random() * 99999) + '"> <PARAM NAME="quality" VALUE="high"> <param name="menu" value="true" /> ');
document.write('<EMBED src="Mymovie.swf?r=' + Math.round(Math.random() * 99999) + '" quality=high menu="true" WIDTH="766" HEIGHT="604" NAME="Mymovie.swf" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');
//-->
</script>
</div>
</body>
</html>
garion1
11-11-2005, 02:33 PM
Thanks. I'll try.
I am having this same issue and I did add the randomly generated number to my swf filename in html.
Does anybody have any other solutions??
This is how my site works:
1. page with flash is opened (flash is grabbed from server)
2. the flash then directs you to another page
3. the new page allows you to press a button to go back to the flash page
4. when you go back to the flash page the flash is no longer grabbed from the server.
At step 3, if the button opens up the flash page in a new page then it works fine, but I want it to open up in the same page.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.