In one of my flash project i am getting xml data from the aspx file. But it always shows the same data and the new data is not coming in the request. I suspect the problem is in cache. Below is my code
var urlloader:URLLoader=new URLLoader();
var header:URLRequestHeader = new URLRequestHeader("Cache-Control", "no-cache");
var urlRequest:URLRequest=new URLRequest(serverPath +
'GetScoreDetails.aspx?CardNo='+CardNo);
fscommand("LOG", serverPath + 'GetScoreDetails.aspx?CardNo=' + CardNo );
urlRequest.requestHeaders.push(header);
urlloader.addEventListener(Event.COMPLETE, loadedCompleteHandler);
urlloader.load(urlRequest);
var xmlPath:String="replaceYourXMLPathHere.xml"
var urlReq:URLRequest = new URLRequest(xmlPath+"?time=" + new Date().getTime());
http://www.newtonflash.com/blog/2009/06/08/prevent-xml-caching-problem/#comment-43
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With