如何告诉 Gaia 缓存加载的 swf 文件?
我使用 Gaia 框架构建了一个自动滚动的幻灯片。总共只有 4 个页面,但我沮丧地意识到,每个页面都是从服务器一遍又一遍地请求的。如果您让页面保持打开状态并且动画自行播放,则可能会破坏我们的服务器。
我可以做什么来防止这种情况发生?我想知道是否有一种编写 URLRequest 的方法,以便 pragma header 可以告诉浏览器使用其缓存中的 swf,而不是再次请求它?
请注意,我没有使用 SWFaddress,因此请求将发送至相同的 URI。
I used Gaia framework to build a self-scrolling slideshow. There are only 4 pages in all, but I have realized to my dismay that each of these pages are requested over and over from the server. If you leave the page open and the animation goes by itself, that can clobber our server.
What can I do to prevent this? I wonder if there is a way of writing a URLRequest so the pragma header can tell the browser to use the swf from its cache rather than requesting it again?
Note that I am not using SWFaddress so the requests are going to the same URI.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用这个:
http://www.elevation-inc.com/dev/jeff/gaiacache/< /a>
“核心思想是基于添加新流程 Gaia.CACHE。缓存页面/swf 时,在这些资源中进行垃圾收集非常重要。页面永远不会被销毁,而是依赖于调用 transitionIn 和 transitionOut - 在浏览会话中可能会出现多次。”
我想这可能会解决你的问题。
use this:
http://www.elevation-inc.com/dev/jeff/gaiacache/
"Core idea is based on adding a new flow, Gaia.CACHE. When caching pages/swfs, it is very important to garbage collect within those assets. Pages will never be destroyed, but will rather rely on calling transitionIn and transitionOut - potentially several times in a browsing session."
I think it might solve your problem.