Flash cache problem when parsing XML file

Flash cache problem when parsing XML file

Sometimes when we use a flash mp3 player where song lists are fetched from a XML file, it shows the same song as before after re-writing the XML and reloading the player using AJAX. This is simply a cache problem u know.

To solve this issue u need to open the source (.fla) of ur flash player. At the line where u call the XML file

Example:

myMp3player.loadConfig("http://<path-to-server>/config.xml");

Here after the file name (config.xml) add this code :

+"?nocache="+new Date().getTime()

That is,

myMp3player.loadConfig("http://<path-to-server>/config.xml"+"?nocache="+new Date().getTime());

Done! now u can call ur flash player by AJAX without having any cache problem. :)

One thought on “Flash cache problem when parsing XML file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s