tags:

views:

14

answers:

1

Hi,

I''m using swfobject in joomla and generate dynamic xml's (writing a file) to load slideshow to my listings.

The problem is only in IE where slideshow do not change from last one when change my listings.

It looks like a cache problem tried to add: slideshow.swf?t=" + new Date().getTime(), with no luck :(

Code for xml

$xml .="
    <?xml version='1.0' encoding='UTF-8'?>
    <data random='$r'>
        <time>".$params->get('slide_time')."</time>
        <transition>".$params->get('slide_trans_type')."</transition>
        <transition_time>".$params->get('slide_transition')."</transition_time>
        <autoplay>$autoplay</autoplay> 
        <controlls>$sc</controlls>
        <images>";

        foreach ($images as $img)
        {
            $xml .= "<img path='".JURI::base()."components/comp/uploads/image/".$img['mfile']."'><![CDATA[<span class='big'>".$img['mtitle']."</span><br /><span class='normal'>".$img['mdescription']."</span>]]></img>";

        }

    $xml .="
        </images>
    </data>";

    $file = JPATH_COMPONENT_SITE.DS.'uploads'.DS.'xml'.DS.'source.xml';
    JFile::makeSafe($file);
    JFile::write($file, $xml);

enter code here

+1  A: 

So, the xml is loaded from ... /uploads/xml/source.xml. How is this location passed to the swf? With a swfobject parameter or is it hard-coded in the swf?

You should add the cache-preventing in the location of the xml, so it would be loaded from ...uploads/xml/source.xml?346456456 or something like that.

kkyy
sorce xml is passed as parameter how to add cache preventing to source.xml?
miojamo
it's working thanks!!!
miojamo