FusionCharts Caching

Posted on 2010-01-05
Last Modified: 2012-05-08
Hi Experts,

I am developing a series of near real-time charts using FusionCharts v3 and Coldfusion 8.  I am having trouble with each browser caching the chart, even through the XML has changed.  I am looking for a solution to force each web browser (IE7, IE8, Firefox, Safari, etc...) to display the chart using the new XML file each time the browser is refreshed.

I have attached the code that I am using to display chart.  I am not have trouble displaying the chart itself. I have tried to use the following two examples without any success.

param name="FlashVars" value="&dataURL=chartxml/data2.xml&nocache="+ new Date().valueOf())&chartWidth=900&chartHeight=300

param name="FlashVars" value="&dataURL=chartxml/data2.xml&dataURL=chartxml/data2.xml? + math.random())&chartWidth=900&chartHeight=300

Thank you,


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="250" height="250" id="Column3D" >

<param name="movie" value="FusionCharts/AngularGauge.swf" />

<param name="FlashVars" value="&dataURL=chartxml/data2.xml&chartWidth=900&chartHeight=300>

<param name="quality" value="high" />

<embed src="FusionCharts/AngularGauge.swf" flashVars="&dataURL=chartxml/data2.xml&chartWidth=250&chartHeight=250" quality="high" width="250" height="250" name="Column3D" type="application/x-shockwave-flash" pluginspage="" />


Open in new window

Question by:ehart12
    LVL 16

    Expert Comment

    you're missing a closing " on the end of your FlashVars param, but I assume that's just a copy-and-paste error, and that's not your actual code?

    When you say you've had no success, you mean those two examples you give don't stop the  caching, or do you get errors, or what?

    Author Comment

    Hi duncancumming,

    Thank you very much for the reply!  The two above attempts do not stop the caching.  The page loads and the charts are displayed without any errors, however the chart is incorrect since the XML file has changed.  Also, the missing " as the end of the param is a cut-paste error...

    Thanks again,

    LVL 16

    Accepted Solution

    You are putting your random parameters on the <param> tag, but did you also put it on the <embed> tag at the same time?

    I'm wondering if this
    param name="FlashVars" value="&dataURL=chartxml/data2.xml&dataURL=chartxml/data2.xml? + math.random())&chartWidth=900&chartHeight=300

    should just be:
    param name="FlashVars" value="&dataURL=chartxml/data2.xml? + math.random()&chartWidth=900&chartHeight=300

    i.e. you are repeating dataURL in the above example; also note you seem to have an extra ) after .random

    I've not done anything with FusionCharts, but I assume you have access to CFML at this point?  If so I'd perhaps use a CF function instead, like dataURL=chartxml/data2.xml?#GetTickCount()#

    However you may need to wrap the dataURL param in quotes or something, otherwise I can't see how it knows where your params to dataURL end and your params to FlashVars begins!

    param name="FlashVars" value="&dataURL='chartxml/data2.xml? + math.random()'&chartWidth=900&chartHeight=300

    Author Comment

    Hi duncancumming,

    Thank you very much for the #getTickCount# idea. The code that works for me is as follows:

    param name="FlashVars" value="&dataURL=chartxml/data2.xml?nocache=#GetTickCount()#&chartWidth=900&chartHeight=300"

    Thanks again and have a wonderful day,



    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
    This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
    This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
    Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now