Auto Refresh - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Auto Refresh

gamodggamodg Posts: 2Member
Hi
I have made a page thats makes an AJAX call to the server gets the time and displays it. In the OPEN method i have set

req.open("GET","/timerProg.cgi?param1="+new Date(),false);

The server side programming is in C and CGI

I have set the last parameter as false as i am expecting a synchronous request so that time displayed should be consistent.

I am using new Date() since the browser is caching my request and displaying the same output everytime as i dont know any other alternative.

Please suggest the alternative so that browser does not cache the results and gives proper output each time.
Alternatives for auto refresh apart from the logic i have used are highly welcome

Sign In or Register to comment.