[英]How do we get IE to refresh a flash.swf file every time the page is loaded?
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. 一旦他们登录,他们应该能够看到Coverflow中的图像,但是由于正在缓存Flash对象,因此它们无法显示。
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. 用户可以通过将IE设置设置为(每次访问网站时检查存储页面的较新版本)来解决此问题,但是我们需要一种方法来强制浏览器在登录后刷新Flash对象,而无需告知我们所有的用户都可以在其浏览器中更改设置。
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="600"
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. 您可以看到我的内联c#脚本生成随机数,但这似乎无法刷新对象。
Probably the querystring is not affecting .SWF files, only the file name. 查询字符串可能不影响.SWF文件,仅影响文件名。
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. 胸围这个问题,尝试创建.aspx文件名为streaming_flow2_v8.aspx
并在该文件中设置的所有的缓存头立即到期,“无缓存”等。然后重定向到实际的Flash文件。
Also don't forget to call it like this streaming_flow2_v8.aspx?math=<%= random %>
也不要忘记像这样streaming_flow2_v8.aspx?math=<%= random %>
Can't guarantee it will work but it's worth trying and have good chance of success. 无法保证它会起作用,但是值得尝试并且有成功的机会。 :) :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.