What about writing a server-side script, that returns image to Flex app.

<mx:Image source="getImage.php?file=logo.jpg" />

getImage.php sets the HTTP headers like:

Php code:


<?php

        // set expiry date to a past date
        header("Expires: Tue, 26 Jul 1970 13:00:00 GMT");

        // force always modified
        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
 
        // HTTP/1.1, for proxies
        header("Cache-Control: no-store, no-cache, must-revalidate");
        header("Cache-Control: post-check=0, pre-check=0", false);

        // HTTP/1.0, 
        header("Pragma: no-cache");

        // set content type of JPEG
        header('Content-type: image/jpeg');

        // read the orignal jpeg
        readfile($_REQUEST["file"]);
?> 


Yet another way of doing things :)

-abdul


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Manish Jethani
Sent: Thursday, June 09, 2005 11:31 PM
To: [email protected]
Subject: Re: [flexcoders] clearing the Flex Cache

On 6/9/05, dave buhler <[EMAIL PROTECTED]> wrote:

> If you load images and such from Flex, then the web browser caches
>  those.  Unfortunately it can be hard to refresh these sometimes
(based
>  on what I've heard here).  One trick I know is to append a random
>  string to the end of the image URL.  Do this in ActionScript.  See
>  this example:
> http://www.shockwave-india.com/blog/actionscript/?asfile=skipCache.as

Another trick is to put all your images on a single HTML page.  When
you change an image, visit that page and do a hard refresh (Ctrl +
R?), which'll download the new images.  Then go back to your Flex app
in the same browser window and you're set.

That was of course for development mode, and if you're not changing
the images too often.


 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to