JavaScript in desktop gadget httpRequest?

MantasD

New member
Joined
Jan 27, 2011
Messages
0
Reaction score
0
Points
0
Hi, i'm writing a simple gadget... what it does, is pulls a source of a website, checks the text between few tags, and if they match what i need, displays them in my gadget. Now, the problem is, that i notices that this website i pull the source from, keeps giving me the same source since yesterday... now, i believe is it's because of a header i give when requesting it... ok cut the long story short, can someone give me a simple code with a fine header that would pull up to date source like it would be if i logged in with a browser

i go like this:

var http = new XMLHttpRequest();
http.open("GET","...", false); //i will censor web for my private reasons :P
http.setRequestHeader('User-Agent', '...') //i have tried FireFox full header didn't work
http.send();

anyway help me :)) thanks
 
Are you using Internet Explorer? I think your results are getting cached.
Doing something like this,
http://woork.blogspot.com/2007/11/how-to-solve-internet-explorer-cache.html
worked for me.
 
Back
Top