PDA

View Full Version : Page automatically to get image changes from server



Rads
01-17-2006, 10:51 PM
I want the the page on the site to reflect the latest images pushed on to the server. What can be done to achieve that.
Tried a couple of options.
1)Calling reload on load goes to an infinte loop.
2)Browser picks the images with latest timestamp. But it works sometimes and doesn't sometimes.

any suggestion .
Thanks in advance.
Rads

jscheuer1
01-18-2006, 05:59 AM
How about having the page reload say, every 2 minutes or something?

Rads
01-18-2006, 03:50 PM
But I think that would create un necessary network traffic. Sending requests when not required.Isn't it

jscheuer1
01-19-2006, 02:11 AM
Well, there is no real way to tell, using only javascript, when the page might need to be updated. So, it then becomes a problem in logic. How often would one need to check (reload) to be reasonably sure no critical information was missed? How many image tags are involved? Also, if the image(s) were in (an) iframe(s), only the iframe(s) would have to be refreshed. What I am getting at here is, cutting down to a minimum any bandwidth that would be required. There are probably ways to do this with greater precision, using a server side language but, that is beyond both my current knowledge and the scope of this (the javascript) particular forum. You might ask in PHP or another server side forum here and/or at other online help forums.

Twey
01-19-2006, 09:50 AM
AJAX would work. I'll work on it.