Cached XML

I want to refresh XML file, but it doesn’t seem to refresh the data.



I am sending a new URL each time I request the XML file as shown below, but the data doesn’t change.



mygrid.loadXML(“grid.php?uid”+(new Date()).valueOf());



I tried sending the following header in the XML file as well.



header(“Cache-Control: no-cache, must-revalidate”);



I am sending different MySQL queries with different WHERE clauses, so I need to see different data as I refresh the page.



Thanks in advance,

Providing the pseudo-unique element in URL is enough in most cases, it must prevent caching of XML on client side.
If XML still cached, you can try to switch to the POST requests ( POST mode can’t be cached, so it is ultimate solution )
For such update you need to modify dhtmlxCommon.js file, add next line as first line of dtmlXMLLoaderObject.prototype.loadXML functions
        postMode=true;
this will switch ALL data requests to post mode ( the meaningfull part of request still will come in GET part,  but request itself will be a POST )  

Menwhile, by default, loadXML command fetchs new data and adds it to existing, please be sure to clear previous data by grid.clearAll(); before loading new one.