Reputation:
I am using AS2. I load an XML file in my movie. Somehow, the XML file is loaded. Now. if I change the XML file, the latest XML file do not appear in FireFox while lates XML file appears in IE. Can anybody tell what is the problem
Upvotes: 1
Views: 809
Reputation: 1392
Taking it further, you'll want to make sure that this situation doesn't arise in the future - i.e. after you've cleared your cache this time...
There are several methods:
./data.xml?nocache=010920091407where you use the Date object to dynamically generate the value of nocache. This is OK, but means that the XML will never be cached, since every time the flash is loaded the nocache value will change.
./data.phpSame issue as the above: the content is never cached but loaded afresh every page view
./data.xmlbecomes
./data.010920091407.xmlwhere 010920091407 is the filemtime value of the file (i.e. when it was last updated)
RewriteRule ^(.+)\.(.+[0-9])\.(js|css|swf|xml)$ $1.$3strips out the
.010920091407and returns the file at
./data.xmlbut the browser thinks it's loading a new file. Now you can guarantee that users will load a new version of the file every time it does change, but from cache if it hasn't. (You'll see that here I've told it to do this to any of the files I typically need to be guaranteed of an update: *.js, *.css and *.swf as well)
Update: a useful tutorial can be found here:
http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/
A more in-depth one is here:
http://www.ejeliot.com/blog/125
Upvotes: 0