How to clear XML HTTP Cache

several days ago, according to xml http in javascript in sharepoint, I wanted to get xml data from a list (see the last article Filter Lookup List in Sharepoint ), but the response data is not latest even if some source data is changed just now.  today I searched in internet, fortunately I find it! just to link a random parameter behind from which URL you want to get data.
 

For example:
var reqstring = siteName + "/_vti_bin/owssvr.dll?CS=109&XMLDATA=1&RowLimit=0&List=" + lookupListName + "&View=" + lookupViewName; 

                            
//I have to link a random number behind the url to clear XMLHTTP cache

                            reqstring 
= reqstring + "&id=" + Math.round(Math.random()*100); 

                            
var req = new ActiveXObject("MSXML2.XMLHTTP"); 

                            req.open(
"GET",reqstring,false); 

                            req.send();


actually it's very simple, isn't it?
posted @ 2007-09-11 19:15  AutodeskWebDev  阅读(435)  评论(1编辑  收藏  举报