5 Replies Latest reply on Oct 3, 2011 1:57 AM by Michael Orzechowski

    How to ensure that latest version of Flex application is loaded

    Michael Orzechowski Level 1

      Hello experts

       

      I have a bit of dilemma here. I am working on application which is going to be used at various locations (globally).

      Level of technical knowledge of users varies quite a lot so do operating systems authorizations of the PCs they are working on (various companies with different level of security).

      At the moment I am facing issue where some users are still using older release of the Flex application even after refresh and deletion of temporary internet files.

      Is there any way to ensure (using some AS code or Flex project settings) that only latest versions of SWF files are loaded (not the one from buffer/cache)?

       

      Regards

      Michael

        • 1. Re: How to ensure that latest version of Flex application is loaded
          Michael Orzechowski Level 1

          BTW, I have added following line to the HTML template/wrapper:

           

          <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

           

          but it is still picking up older version of SWF file on certain PCs. It does read latest HTML (wrapper) file though. Seems that caching is only enabled for either certain file types or files exceeding certain size.

           

          I have decided to do something a bit daft (or cheeky, depends how you look at it) as temporary solution and rename 2 main files (main SWF and HTML) to something like:

           

          Application_name_ver_XYZ.*

           

          It can be done in couple of minutes after release build has been exported (no need to update project itself). That way I can fool browser so it will pick up latest version (since its different file with different name).

          Main application consists of 10+ modules and some of them are compiled into separate SWF files. I am loading them inside application using ModuleLoader component. I have set parameter cachePolicy to "off" as I am not going to rename all these modules each time I am releasing new version of application.

          The end result is that main application is refreshed but all modules that are being loaded are picked up from cache (old versions).

           

          So as a last resort I have decided to change folder name of my application. That way all the files (main app and modules) are considered as new files since location of all of them has changed. It is just a workaround, it does work but it carries certain risks. If user will use old link application will still load (older version) and then consequences can be catastrophic (even corruption of data).

           

          Has anyone experienced same issues?

          I know these are more browser/network issues but how do I deal with them. Some of these people cant ask IT for support (for various reasons). Is there anything else I can do to ensure that users across the board will use latest version of application?

           

          Regards

          Michael

          • 2. Re: How to ensure that latest version of Flex application is loaded
            Michael Orzechowski Level 1

            I have decided to build inside my application check (PHP function call to DB) if version of application is not older than latest one.

            Latest one is registered as soon as its being released and run. That way at least I am preventing users from using old version (if its being picked from cache).

            I am still hoping that I can somehow force only latest SWF to be picked (sadly even setting cachePolicy to "off" in ModuleLoader does not work on some PCs).

             

            Anyways, would appreciate any pointers you might have.

             

            Regards

            Michael

            • 3. Re: How to ensure that latest version of Flex application is loaded
              Anirudh Sasikumar Adobe Employee

              Hi,

               

              I've tried this and it has worked for me: Every time you make a new release, append a different dynamic string to the url. For example, foo.swf?v22. Same for URL strings passed to ModuleLoader/SWFLoader.

               

              -Anirudh

              • 4. Re: How to ensure that latest version of Flex application is loaded
                Michael Orzechowski Level 1

                Anirudh

                 

                Thanks for the tip, I will check it out when I have some time. I am swamped with other work now but just wanted to acknowledge your help so you wont think I have ignored your suggestion:)

                Will try to update this thread soon and award some points if deserved;)

                 

                Regards

                Michael

                • 5. Re: How to ensure that latest version of Flex application is loaded
                  Michael Orzechowski Level 1

                  I have adopted a max-one-release-per-day schedule in which case caching does not seem to be a problem anymore.

                  On top of that I have built in version check to (at least) prevent user(s) from using older releases until cache will be flushed and they will be able to run the latest application.

                   

                  Anirudh, thanks for your input, I might try it someday.

                   

                  Regards

                  Michael