[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 602
  • Last Modified:

need to force SWF to reload, avoid browser cache

The SWF embed on this page is attached:


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 {
			'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',
			'movie', 'musicTriviaGame',
			'salign', ''
			); //end AC code
	<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" />

Open in new window

1 Solution
bbdesignAuthor Commented:
Thank you. Good idea, just add a variable.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now