简体   繁体   English

每次加载页面时,如何使IE刷新flash.swf文件?

[英]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.

相关问题 如何在不刷新页面的情况下显示每秒变化的值? - How do I display a value that changing every second without doing a page refresh? 每次用户刷新页面时需要旋转标签中的文本 - Need to rotate text in a label every time user refresh the page 获得响应后如何刷新加载iFrame的页面 - How to refresh the page on which iFrame is loaded after getting response 每次上传新二进制文件时都会出现新的日志文件 - New log file every time we uploaded new binaries 在提交两到三个表单后,我们如何在asp.net(C#)中获取第一个flash文件数据? - How can we get First flash file data in asp.net (C#) after two or three form submission? 如何在每次单击按钮时刷新用户控件 - How to refresh a user control every time a button is clicked 如何每五分钟使用c#int刷新一次页面? - How to refresh page using c# int every five minutes? 单击Flash(.swf文件类型)后发生事件 - Event occurs after clicking a Flash (.swf file type) 如何将变量保存到新的文本文件,以便下次运行程序时加载这些变量? - How Do I save variables to a new text file so that those variables are loaded the next time the program runs? 在每次页面刷新时重新加载数据表 - Reload DataTable on Every Page Refresh
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM