When a user visits our site they see a coverflow. They are not logged in so they cant see any images. Once they log in they should be able to see images in the coverflow but they cant because the flash object is being cached.
A user can get around this problem by setting the IE settings to (check for newer versions of stored pages every time they visit a site) however we need a way to force the browser to refresh the flash object once they are logged in, without telling all of our users to change the settings in their browser.
Is this possible?
I have tried adding the following:
<div class="flash">
<script type=text/javascript>
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0',
'width', '600',
'height', '225',
'src', 'streaming_flow2_v8?math=<%= random %>',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'transparent',
'devicefont', 'false',
'id', 'streaming_flow2_v8?math=<%= random %>',
'bgcolor', '#ffffff',
'name', 'streaming_flow2_v8?math=<%= random %>',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','true',
'movie', 'streaming_flow2_v8?math=<%= random %>',
'salign', ''
);
</script>
<noscript>
<embed
src="streaming_flow2_v8.swf?math=<%= random %>"
width="6开发者_开发百科00"
id="<%= random %>"
height="225"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="address=/playlist.aspx?math=<%= random %>"
/>
</noscript>
</div>
You can see my inline c# script to generate random numbers but that doesnt seem to refresh the object.
Probably the querystring is not affecting .SWF files, only the file name.
To bust this, try creating .aspx file called streaming_flow2_v8.aspx
and in that file set all the Cache headers to expire immediately and "no-cache" etc.. then Redirect to the actual flash file.
Also don't forget to call it like this streaming_flow2_v8.aspx?math=<%= random %>
Can't guarantee it will work but it's worth trying and have good chance of success. :)
精彩评论