Reply to Re: prevent page refresh if content has not changed

Your name:

Reply:


Posted by Tyrone Slothrop on 10/20/05 02:27

On Wed, 19 Oct 2005 18:15:04 +0200, "Greg N." <yodel_dodel@yahoo.com>
wrote:

>I wrote kindof a webcam application, which consists of
>
>- a client app that sends images to the server in irregular intervals,
>using FTP
>- a php page on the server that displays the latest picture
>
>The php page is supposed to be be reloaded by the browser in 15 second
>intervals, such that the newest picture is always shown, as long as the
>browser is on that page. I'm using the following code in the display
>page's HEAD section to trigger the reloading:
><meta HTTP-EQUIV="refresh" Content="15">
><meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
>
>Now my question:
>
>Is there a way for my display page, in response to a refresh request,
>to send a signal to the browser that says something like "keep
>displaying the current page, i'm not sending a new one, because it has
>not changed".

Maybe run a function on the page with an image in an iframe that loops
an evaluation of the filemtime that triggers a JavaScript function
that will reload the parent?

<?
for ($i=0; $i<1000; $i++) {
sleep(15);
if (filemtime($filename) > time()-15) {
?>
<script>location.reload;</script>
<?
}
}
?>

But will the page load completely with the script running? Not sure
about that.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация