• Advertisement
Sign in to follow this  

[web] Any Flex/Actionscript developer here ?

This topic is 3829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this odd problem ... I have a very simple routine (see code below) that load an XML file and display its first "record" in a label:
private function LoadXmlFile():void 
{ 
var loader:URLLoader = new URLLoader(); 
var request:URLRequest = new URLRequest("loadXML.xml"); 
loader.load(request); 
loader.addEventListener(Event.COMPLETE, onComplete); 
} 


private function onComplete(event:Event):void 
{ 
var loader:URLLoader = event.target as URLLoader; 
if (loader != null) 
{ 
xml = new XML(loader.data); 
DebugLabel.text=xml.child("name").text()[[0]] + "," + xml.child("surname").text()[[0]]; 
} 
} 


private function reload():void 
{ 
LoadXmlFile(); 
} 


The odd thing is that if I modify the xml data locally (in the project hard drive folder), and then I reload the file with the reload() function, the file is correctly reloaded and new content is displayed. Same behaviour does not apply if I upload the project to a web server: when I click on the reload button, even if I previously modified the xml file, it always show the old content, instead of reloading the new one. Any idea ?

Share this post


Link to post
Share on other sites
Advertisement
i would say it has to do with the browser caching
http://www.communitymx.com/content/article.cfm?cid=827EA

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement