Preventing Flex application caching in browser (multiple modules)

后端 未结 5 879
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 15:11

I have a Flex application with multiple modules.

When I redeploy the application I was finding that modules (which are deployed as separate swf files) were being cached

相关标签:
5条回答
  • 2021-02-04 15:52

    What I have done is checksum the SWF file and then add that to its url. Stays the same until the file is rebuilt/redeployed. Handled automagically by a few lines of server-side PHP script

    0 讨论(0)
  • 2021-02-04 15:53

    I had a similar problem, and ended up putting the SWF files in a sub-directory named as the build number. This meant that the URL to the SWF files pointed to a different location each time.

    Ideally this should be catered for by the platform, but no joy there. But this works perfectly for us, and integrates very easily into our automated builds with Hudson - no complaints so far.

    0 讨论(0)
  • 2021-02-04 15:55

    here is sample.

      function AC_FL_RunContent(){
        var ret = AC_GetArgs(arguments, ".swf?ts=" + getTS(), "movie", 
                  "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
                  "application/x-shockwave-flash");
        AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);  
      }
    
      function getTS() {
        var ts = new Date().getTime();
        return ts;
      }
    

    AC_OETags.js is file and it exists html-template several places. but as my posting said, I am facing another type of problem.

    0 讨论(0)
  • 2021-02-04 15:57

    The caching is not done by Flash Player but by the browser, so it's out of Adobe's control. I think you have found a workable solution. If I want to avoid caching I usually append a random number on the URL.

    0 讨论(0)
  • 2021-02-04 16:10

    Flex says:

    http://www.adobe.com/livedocs/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001388.html

    0 讨论(0)
提交回复
热议问题