简体   繁体   English

Flash是否在所有浏览器中都遵守Cache-Control&Expires标头?

[英]Does Flash respect Cache-Control & Expires headers in all browsers?

I'm working with a Flash .swf file made by someone else for which I do not, and will not ever have the source. 我正在使用其他人制作的Flash .swf文件,但我没有这个文件,也永远不会有源文件。 I believe it's been developed in Flash 9/AS3 but I'm not sure of this. 我相信它是在Flash 9 / AS3中开发的,但是我不确定。

The Flash program loads in its settings from an XML file: config.xml. Flash程序从XML文件config.xml加载其设置。 By editing this file I can manually force re-caching of loaded assets (by appending ?uniquestring to URLs in the config file which will be loaded later). 通过编辑此文件,我可以手动强制重新缓存已加载的资产(通过在配置文件中的URL后面附加?uniquestring来稍后加载)。

However, the config.xml file is hard-coded and I can't force a query string on this. 但是,config.xml文件是硬编码的,因此我不能对此强制查询字符串。 By default the browser just looks for this in the cache and doesn't update. 默认情况下,浏览器仅在缓存中查找此内容,并且不会更新。

I can use PHP or .htaccess to send various styles of no-cache headers for the config.xml but I don't know if all browsers / flash players will respect them, in particular IE which I've read lots of conflicting information about. 我可以使用PHP或.htaccess为config.xml发送各种样式的no-cache头,但是我不知道所有浏览器/ Flash播放器是否都会尊重它们,特别是IE,我已经阅读了很多有关的信息。

Does any have a definitive answer to this? 有什么明确的答案吗?

Many thanks, 非常感谢,

James 詹姆士

Flash Player uses the browser to fetch files, and it is up to the browser to decide if it will use the item in the cache or request it from the server. Flash Player使用浏览器来获取文件,然后由浏览器决定是否使用缓存中的项目或向服务器请求该项目。 So any mechanisms you use to tell the browser not to cache the XML should work. 因此,您用来告诉浏览器不要缓存XML的任何机制都应该起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM