Try adding a random parameter to your url:

var url="http://myurl/xmltest.xml?random="; + Math.random();

Benjamin

On Mar 31, 12:05 pm, Giridhar <[email protected]> wrote:
> Hi
>
> I am developing a RSS reader gadget and I am accessing the URL through
> an Ajax call (GET request). I am testing the functionality by
> accessing a similar xml which is saved in webserver(not the exact RSS
> feed from the website)
> The problem is that even though I am calling this URL every 10 mins, I
> am not getting the latest response from the XML. Can anyone suggest me
> a workaroud for this problem by clearing cache or something
>
> here is an extract of my code
>
> //Global var
> var interval = 600; //10 mins
> var url="http://myurl/xmltest.xml";
>
> utils.setInterval(view_onOpen, 1000 * interval);
>
> function view_onOpen()
> {
>   if(framework.system.network.online ||
> framework.system.network.wireless.connected)
> {
>     call(baseUrl);  }
>
> }
>
> function call(url) {
>
>   httpReq = new XMLHttpRequest();
>   httpReq.onreadystatechange = getResponse;
>   httpReq.open("GET", url, true);
>   httpReq.send();}
>
> function getResponse()
> {
>     if(framework.system.network.online ||
> framework.system.network.wireless.connected)
>    {
>        if(httpReq.readyState==4)
>       {
>         if(httpReq.status==200)
>         {
>                    //Retrieve xml
>                 }
>        }
>
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to