0 Replies Latest reply on Dec 5, 2009 1:49 AM by snorky

    How To Compare Cached Image to Remote One

    snorky Level 1

      I have a problem I'm trying to solve and wondered if anyone here has any advice. I want to have my AIR app act a little like a browser (but I do not wish to use a browser inside my app).
        
      I want my AIR app to do the following before displaying a dynamicly loaded image, 
        
      1) check the cache for the image file and if found 
      2) then check online to see if the online version is newer 
      3) if so display the online file 
      4) otherwise display the cached one 
      5) if the image is not cached AND there is no network connection (or the file is not found online) then I want to display my own default image 
        
      how can I check whether the remote image is newer than the cached image?

       

       

      there is a great recipe here for checking for presence of the cached image but I need to go further!

       

      http://cookbooks.adobe.com/post_Caching_Images_to_disk_after_first_time_they_are_l-10784.h tml