[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

Caching issue with flash

We have a flash slideshow file that loads links and images from an XML file.  We need the flash file itself to cache like normal behavior, however it seems to be caching the XML file as well.  This file changes regularly, and this is causing a problem.  How can we change this, either through the ActionScript or through the XML file header so that it doesn't cache the XML?

I wish I could offer the sample code that handles the XML request, but I can't get to it at the moment.  I'm going to assume it's a simple XML.load expression and not an XML socket.
0
jamesbcox1980
Asked:
jamesbcox1980
  • 2
2 Solutions
 
deepanjandasCommented:
add a random number to the xml url path while calling from flash, like this:

var r:Number = Math.Random();
new URLRequest( "http://womedomain.com/xml/sample.xml?r="+r);

Warm Regards
Deepanjan Das
0
 
quizengineCommented:
0
 
jamesbcox1980Author Commented:
Thanks, we will try adding the "?nocache=" and the date/time.  It appears to the safest way, however improbable it might be that we will get the same random number twice.  I'll try tomorrow and let you know how it works.
0
 
jamesbcox1980Author Commented:
Thanks, both answers work equally.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now