Link to home
Start Free TrialLog in
Avatar of Brad Bansner
Brad Bansner

asked on

need to force SWF to reload, avoid browser cache

The SWF embed on this page is attached:

http://www.stumpedagain.com

We are having a problem with the game not completely reloading each time, I guess it is getting cached in the browser. I have this in the head of the file (ASP script):


<%      response.cachecontrol="no-cache"
      response.addheader "Pragma", "no-cache"
      response.expires=-1 %>

...to try to avoid caching, but that might only be affecting the HTML, not the SWF.

How can I force the SWF to reload each time the page is hit? I was thinking of maybe pointing a variable with the musicTriviaGame.swf URL maybe? Something with a date/time? I'm not sure how to do that, or if that would work.

Thank you!
<div class="gamemodule">
<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', '440',
			'height', '300',
			'src', 'musicTriviaGame',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', 'musicTriviaGame',
			'bgcolor', '#000000',
			'name', 'musicTriviaGame',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', 'musicTriviaGame',
			'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="440" height="300" id="musicTriviaGame" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="musicTriviaGame.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />	<embed src="musicTriviaGame.swf" quality="high" wmode="transparent" bgcolor="#000000" width="440" height="300" name="musicTriviaGame" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</noscript>
</div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Bryan Butler
Bryan Butler
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brad Bansner
Brad Bansner

ASKER

Thank you. Good idea, just add a variable.