If I follow that code properly you're adding a 'no-cache' value to the
headers.  I'm not sure if that's the right way to do it.

Try this.  Add some query parameter to the end of your URL that has a
unique value (like the current time in milliseconds).  So something
like:

http://<server>/path/to/file.xml?uniq=<currentTime>

The browsers will see that it's a different URL and will always
redownload it, but unless the server is specifically using that query
parameter it will just be ignored.

  -Andy

On 3/30/07, Daniel Thompson <[EMAIL PROTECTED]> wrote:
Thanks guys. I added a cache-busting param to the request, but it didn't fix
the issue. Here's my method:

protected function invoke(resource:String, variables:URLVariables,
                                successHandler:Function,
errorHandler:Function = null):void {
      variables.api_key = KEY;

      var request:URLRequest = new URLRequest();
      request.method = "GET";
      request.url = _server + FORMAT + resource;
      variables["no-cache"] = Math.round(new Date().time).toString();
      request.data = variables;

      if (errorHandler == null) {
        errorHandler = onIOError;
      }

      var loader:URLLoader = new URLLoader();
      loader.dataFormat = "xml";
      loader.addEventListener(Event.COMPLETE, successHandler);
      loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);

      try {
        loader.load(request);
      } catch (error:Error) {
        throw new Error("Unable to connect");
      }
    }



It just seems odd that if I clear my cache, everything works again.


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to