This content has been marked as final. Show 6 replies
Anybody? I have all sorts of meta tags in my document specifying cache control and it still caches my flex/swf document.
The only fool-proof way I've found of doing it is to make the URL to the SWF unique by appending a query string parameter. eg:
For a Flex HTML wrapper, you have to modify the AC_FL_RunContent call as well by changing the "src" parameter. eg:
AC_FL_RunContent("src", "MyApp?version=1.1", ...
There is a Cache-Control and Pragma parameter in the header of the response to your client's request. I believe if you set the Cache-Control to 'no-store' and 'no-cache' and set the Pragma to 'no-cache', this should stop IE from caching the page. How this is done is different for each application server, so you may have to refer to their documentation on how to get this accomplished.
Yeah, this is tough. If your web server admin skills are strong, you might be able figure out how to set the headers, but many ouf us just use the querystring parameter method, often appending new Date().toString()
There's also the added complication that cache control headers would (AFAIK) affect only the caching of the HTML wrapper. The browser does a separate fetch to get the SWF, which would result in its own set of headers. How you would control that is more complicated.
inlineblue and Tracy,
Came across this post while looking for a solution for the cache problem. I am using Flex 2.0.1.
Q1) From what I understood is adding a parameter to the AC_FL_RunContent("src", "MainMod?version1.1",...) call in the HTML wrapper will make sure the latest content is downloaded to the browser. Does this mean when the next time my MainMod.mxml is changed, I need to make this V1.2.
Q2) I only saw one occurance of AC_FL_RunContent call in my wrapper where it is referring my SWF file. This is the only place I need to keep changing whenever the mxml file is changed?
Q3) Looks like I have to change all Wrapper files (if I have multiple .mxml files in my project). Is there any we can automate this?
Do you have a sample that I could take a look at to understand what needs to be changed to fix the issue?
Appreciate your help.