1 Reply Latest reply on May 24, 2013 9:09 AM by keyofgmajor

    Caching issue with Flash Player 11.7

    keyofgmajor Level 1



      Our Flash app is live-streaming MP4 video from our CDN, starting with the recent release of Flash Player 11.7



      We have a Flash app that runs in the browser. We see the problem with IE 8, 9, 10, on Windows XP and Windows 7. Both 32-bit and 64-bit.  When our app makes a request for a MP4 video to our CDN, the browser refuses to cache it, and it is causing high network traffic. Caching worked fine in Flash Player 11.6.


      Using Fiddler, we have contrasted HTTP requests in good/bad cases. The only difference is that, with Flash Player 11.7, the (bad) raw request contains:

      Pragma: no-cache 

      I realize that this is implementation specific. Note that we don't want this.

      We are using the OSMF framework (version 2.0) and have access to the source.

      Our code looks approximately like:

      resource = new URLResource(url);

      player = new MediaPlayer();

      factory = new DefaultMediaFactory();

      element = factory.createMediaElement(resource);

      player.media = element;


      We are reasonably sure that the URLResource (or its implementation) is adding the Pragma field.



      Does anyone have a fix for this? I'm interested in (a) suggested patches to OSMF (b) settings for Flash Player. What changed?

      EDIT: We wonder if IE is adding the "Pragma no-cache" because it perceives our video SWF to be either a proxy or outside the "sandbox", so to speak. I have seen notices that 11.7 can introduce issues with backwards compatibility. We are using Flex 3.6. Are there any issues that smell like this one?

        • 1. Re: Caching issue with Flash Player 11.7
          keyofgmajor Level 1

          In short, the following worked for us:


          Change this:


              var resource:URLResource = new URLResource(url);


          to this:


              var resource:StreamingURLResource = new StreamingURLResource(url);

              resource.streamType = StreamType.LIVE_OR_RECORDED;


          In detail, we know that OSMF 2.0 did not change between Flash 11.6 and Flash 11.7. However, it seems as though the interpretation of the default value of 'streamType' did change, possibly by accident. Flash 11.7 treats the default as though it is a "live stream" and does not cache.


          By specifying streamType explicitly, things go back to normal. There is no "Pragma: no-cache" in the HTTP request. Our app calls out for the video once, and then it is cached. This fix also works in the original env, Flash 11.6.