分发对现有 SWF 应用程序理论的更改

发布于 2024-11-19 10:35:43 字数 349 浏览 7 评论 0原文

假设我们有一个用 AS3 编写的在线应用程序,并从服务器作为 SWF 提供服务。第一个发布的版本是V1.0。

多个用户(其中​​一些位于代理服务器后面)使用 V1.0 应用程序,现在客户端计算机和代理服务器上有一个缓存副本。

V1.1已发布并放置在服务器上。所有用户都应该看到 V1.1,但结果会有所不同,有些用户将获得新副本,有些用户将在一段时间内收到其缓存副本,最后有些用户将获得代理服务器中的缓存副本。

我可以在 V1.0 中编写代码来检查服务器变量以查看它是否已过期。但是如果它已经过时了,AS3 有没有办法强制它下载一个新的副本,或者将差异应用到自身中?

考虑到我无权访问代理服务器,无法手动或自动清除缓存。

Lets say we have an online application written in AS3 and served from a server as a SWF. The first version to go out is V1.0.

Several users, some behind a proxy server, use the V1.0 application and now there is a cached copy on the client machines and the proxy server.

V1.1 is released and placed on the server. All users should see V1.1, but results will vary, some will be served the fresh copy, some will for a period receive their cache's copy, and finally some will be served the cache'd copy in the proxy server.

I can be code in the V1.0 that checks a server variable to see if it's out of date. BUT if it is out of date, is there a way in AS3 to force it download a fresh copy, or apply the differences into itself?

Considering that I don't have access to the proxy server and can't manually or automatically clear the cache.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

尝蛊 2024-11-26 10:35:43

SWF 是唯一被缓存的东西吗?如果是这样,那么您可以在加载页面时使用缓存消除器。

像这样引用您的 SWF:main.swf?timestamp=7062956829 这将导致代理服务器认为它是一个不同的文件,并且不提供缓存的资源。

Is the SWF the only thing getting cached? If so then you could use a cachebuster when the page gets loaded.

Refer to your SWF like so: main.swf?timestamp=7062956829 this will cause the proxy server to think its a different file and not serve up the cached resource.

各空 2024-11-26 10:35:43

您可能有一个包装预加载器,每次应用程序启动时,它都会向服务器请求最新版本号,然后加载最新版本的应用程序 swf。

还有一些明智的更新分发解决方案,例如 http://treetide.com/swfcontrol/

You may have a wrapper-preloader which requests the latest version number from the server each time the application starts, and then loads the application swf of the latest version.

There are also wise solutions for updates distribution like http://treetide.com/swfcontrol/

泪之魂 2024-11-26 10:35:43

我认为 Citizen conn 提供了一个简单的解决方案,尽管它引入了不必要的服务器负载。

您可以使用 Citizen conn 的方法,但不使用时间戳,只需使用应用程序的版本标签。

main.swf?app_version=1.1

另一种方法是使用 DigitalD 的方法强制应用程序本身刷新。

但是,由于您在容器 html 页面中使用它,容器也可能被缓存,因此您需要强制重新加载容器......

I think citizen conn provides a simple solution, albeit it introduces unnecessary server load.

You could use citizen conn's approach but instead of a timestamp, just use the app's version tag.

main.swf?app_version=1.1

A different approach would be to force the refresh from the app itself using DigitalD's approach.

But, since you are using this in the container html page, the container might be cached as well, so you need to force the reload of the container...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文