AJAX

Moderators: None (Apply to moderate this forum)
Number of threads: 61
Number of posts: 110

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Auto Refresh Posted by gamodg on 2 Mar 2009 at 10:08 PM
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




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.