Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Refresh to update images (without creating a loop)

0 views
Skip to first unread message

Robert Karlsson

unread,
Feb 18, 2002, 9:36:52 AM2/18/02
to
Hi,

On a webpage I got a dynamically generated jpg (from PHP) that the
browser don't know has been updated (it uses the cached version). I
can't figure out a way to update the page besides asking the user to
press Reload :-(

<meta http-equiv="refresh" value="1"> does not work since it will
refresh the page endlessly.

With JavaScript onLoad="FOO" might work... but how?

Best
Robert

Jukka K. Korpela

unread,
Feb 19, 2002, 12:44:28 PM2/19/02
to
robk...@astud.chalmers.se (Robert Karlsson) wrote:

> On a webpage I got a dynamically generated jpg (from PHP) that the
> browser don't know has been updated (it uses the cached version).

What makes you think this would be an HTML question?

> <meta http-equiv="refresh" value="1"> does not work since it will
> refresh the page endlessly.

In some browsing situations, yes, the browser will refresh the HTML
document. But what has that got to do with your problem with the jpg
file?

> With JavaScript onLoad="FOO" might work... but how?

Ummm... were you thinking about putting JavaScript into an image file?

It's time to recommend the usual resource on caching:
http://www.mnot.net/cache_docs/

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Tino Korth

unread,
Mar 7, 2002, 3:15:39 AM3/7/02
to
Hello,

is that a solution for you?
You have to put the source into your html-file where you includes your
image.

http://www.f1ndex.de/de/newsletter/impressum.php -> [webcam]


bye

tino

----------------------------------------

<head>
<meta http-equiv="refresh" content="30; URL=./webcam.html">
<meta http-equiv="expires" content="0">
</head>

<script language="JavaScript">
<!--
function neuLaden() {
location.reload(true);
}

window.setInterval("neuLaden()", 30000);
//-->
</script>

<body>
<img src="...">
</body>


0 new messages