PDA

View Full Version : Preventing browser caching how to?



dunger99us
February 13th, 2008, 03:43 PM
i have built a full screen flash site.
but it caches in explorer.

how , or what to write in the parmas etc, to prevent caching???

please help asap, if i cannot find out a solution i will have to resize entire flash, and it will lose its beauty....

:(((

Jackchalat
February 13th, 2008, 04:27 PM
i have built a full screen flash site.
but it caches in explorer.

how , or what to write in the parmas etc, to prevent caching???

please help asap, if i cannot find out a solution i will have to resize entire flash, and it will lose its beauty....

:(((

The solution would have something to do with setting some headers. I have not confirm this but try googling something about php no cache header

dunger99us
February 13th, 2008, 04:30 PM
we are stricly prohibited from using php- IT manager's orders....

Templarian
February 13th, 2008, 04:31 PM
file.swf?random=<?php echo(rand()%9999); ?>

I think thats an easy way to get a random number.


...oh... well then basically try and do the same thing with javascript.



<script type="text/javascript">
var r = Math.floor(Math.random()*99999);
var so = new SWFObject("movie.swf?r="+r, "mymovie", "400", "200", "8", "#336699");
so.write("flashcontent");
</script>


I'm guessing your using swfobject to embed your flash.
http://blog.deconcept.com/swfobject/

dunger99us
February 13th, 2008, 04:44 PM
i am using


<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '100%',
'height', '100%',
'src', 'confidentiality2008',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'noscale',
'wmode', 'opaque',
'devicefont', 'false',
'id', 'confidentiality2008',
'bgcolor', '#000000',
'name', 'confidentiality2008',
'menu', 'false',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'confidentiality2008',
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="confidentiality2008" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="confidentiality2008.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="opaque" /><param name="bgcolor" value="#000000" /> <embed src="confidentiality2008.swf" menu="false" quality="high" scale="noscale" wmode="opaque" bgcolor="#000000" width="100%" height="100%" name="confidentiality2008" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>

Blenderben
February 14th, 2008, 03:54 PM
a really dumb fix, but workable fix would be to do the following:

Create a flash file that loads your current full screen flash site.
So basically you have a outer player that just loads the stuff inside. Think of it as a flashed based iFrame.

you can use loadMovie();

then do the following when you load the full screen .swf

The solution is to load your files with a unique identifier. Example:


myIdentifier=Math.round(Math.random()*10000);
loadMovie("full_screen_flash_site.swf?uniq="+myIdentifier,1);

This works also with LoadVariables, LoadMovieNum and LoadVariablesNum.

So your outer player will never change, but if you ever update your full_screen_flash_site.swf it will always get the new one.

- Info taken from an old kirupa tutorial