If you have control of the server side of your project, you could ask them to include the cache in their response header... I believe that is the way it is supposed to work. The server indicates that the content it is returning is dynamic in nature and should not be cached. While adding the current time to each of your requests as a parameter will avoid caching, it is a bit burdensome if you have a large system to implement. Note also that the no-cache response header is ignored by IE/flashplayer when your request is over https as described here http://blog.fastlanesw.com/?p=9. Note: I also describe the workaround that I use to get around this issue.

hth
Scott

Dan Todor wrote:

Try adding current system time as a parameter to your request, it will avoid caching.
hth

On 9/17/07, *Guido* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi y'all,

    I've been having this problem for a while now, and I've went by
    the docs on RPC components time and time again, getting no
    solution for this.

    I have an HTTP service and I need to guarantee that its results
    are not cached by either the app or the browser.

    My last attempt on this is:

    <mx:HTTPService id="myService"
            concurrency="last"
            headers="{new URLRequestHeader("Cache-Control" ,
    "no-cache")}"
            makeObjectsBindable="true"
            requestTimeout="10"
            showBusyCursor="true"
            useProxy="false"
            url="{myServiceURL}"/>

    When debugging the app, the service's HTTP header property is
    populated by the URLRequestHeader, so I believe It's getting built
    adequately. Also, when inspecting the AsyncToken returned by
    myService.send(), the message property has its headers also
    populated by the URLRequestHeader.

    The thing is that when I check for adequate reception on the
    server side, I don't get the Cache-Control header at all.


    Does anyone know how to make HTTP headers work for HTTPServices?

    TIA,

    Guido.




--
All best,
Dan

Zen is like looking for the spectacles that are sitting on your nose

Reply via email to