473,320 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 10817
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Charles Soto | last post by:
I've got a main loop script that calls two other scripts that do no user interaction. All they do is send a couple of mysql update statements. Then they use header() to call the main loop again. ...
4
by: Martin | last post by:
This is probably more of an HTML question than PHP. Perhaps someone here can answer or point me to a proper newsgroup. How can I force the browser to reload an image from the server? I have a...
17
by: Geoff Cox | last post by:
Hello, Can I use JavaScript to force a maximised window ? Thanks
6
by: Arnold | last post by:
Hey there, I've browsed for some fixes to this but only found a couple of similar posts, which didn't solve my problem. I'm wondering how to refresh an image control in a form after a user...
1
by: brian | last post by:
I have code that runs once a day to change an image on a page. I am having a caching problem because the new image doesn't show. I need to press ctrl + F5 to force a refresh. Is there code I...
5
by: Selden McCabe | last post by:
I have a page that displays a picture. In the page load I figure out which image and then do a StudentPicutre.imageurl = <some file name> But if you use the browser's back button, enter...
10
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application and I need to find a way to cause a page refresh from within my application. Does anyone know how to force the browser to refresh the current page? ...
2
by: Yogi_Bear_79 | last post by:
I have a script that parses window.location.hash to figure out which xml file to load. The xml files populate a page on a framed site. The code works correctly to a point. If I have a seperate...
11
by: Jerry J | last post by:
How can I get an asp:Image to refresh when a user uploads a different jpg. I disabled caching using this command on Page_Load(): Response.Cache.SetCacheability(HttpCacheability.No Cache); but it...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.