469,646 Members | 1,433 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

Force image refresh

How to force image refresh on client browser ? Is ti possible to force the
refresh of the same image (tha was changed server-side) to the client,
without user press Contrl+F5 in IE ?

-
Marco
Nov 17 '05 #1
1 10609
Hi Marco,

There's not really a way to have the server tell the client to refresh the
page. However, the server can send information that tells the client to
refresh the page at a specific interval. There are a couple of ways to do
this. One way is to add a META tag to in the HEAD of the HTML sent to the
client. For instance, if you want the entire page to refresh every 2
seconds, you could add the following tag to inside the HEAD element:

<META HTTP-EQUIV="REFRESH" CONTENT=2>

You can also use client-side script to force a refresh. You could use a
combination of window.setInterval() and location.reload() to periodically
refresh the page.

window.setInterval:
http://msdn.microsoft.com/library/de...etinterval.asp
location.reload:
http://msdn.microsoft.com/library/de...ods/reload.asp

If you wanted to refresh the page only when the image is updated, I would
pursue perhaps having a hidden frame with a page that periodically checks to
see if the image has been updated since the last time it was loaded, then
refresh the entire page if it has.

Good luck!
--
Ray Dixon - Microsoft MVP
ra*@NOSPAM.greeble.com
(remove NOSPAM. from my e-mail address for a direct reply)

"Marco Maroni" <mm*****@yahoo.com> wrote in message
news:OG**************@TK2MSFTNGP12.phx.gbl...
How to force image refresh on client browser ? Is ti possible to force the
refresh of the same image (tha was changed server-side) to the client,
without user press Contrl+F5 in IE ?

-
Marco

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Martin | last post: by
17 posts views Thread by Geoff Cox | last post: by
1 post views Thread by brian | last post: by
5 posts views Thread by Selden McCabe | last post: by
10 posts views Thread by Fred Nelson | last post: by
2 posts views Thread by Yogi_Bear_79 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.