|
|
Subject:
META refresh for web cam images too
Category: Computers > Programming Asked by: jhabley-ga List Price: $5.00 |
Posted:
11 Feb 2003 17:10 PST
Expires: 13 Mar 2003 17:10 PST Question ID: 160238 |
I've got a web page that references the images from two web cams. These cameras upload new images every minute. I know how to do a META REFRESH code to refresh the page, BUT that doesn't also refresh the images. The auto-refreshed simply uses the cached image. You only get new images when you manually refresh. What HTML code do I use to force auto-refresh on the page AND images? | |
| |
|
|
Subject:
Re: META refresh for web cam images too
Answered By: sycophant-ga on 11 Feb 2003 20:32 PST Rated: |
Hi Jhabley, The problem is fooling the browser's cache. The easiest way, and one that works in most cases is to append a '?' to the end of the image SRC, this way the browser generally treats the image as if it were a dynamic object as it assumes you are passing values. Sometimes you may need to actually use fake values. However sometimes this doesn't work as there are transparent proxy servers between you and your target. Try it like so: <html> <head> <title>Cam Images</title> <meta http-equiv=Refresh content="60; URL=http://www.my.page/"> <meta http-equiv=Expires content="Wed, 01 Jan 2003 12:00:01 GMT"> </head> <body> <h1>Cam 1</h1> <img src="http://www.some.server/cam/cam.jpg?blah=1"> <br> <br> <h1>Cam 2</h1> <img src="http://www.someother.server/cam/cam.jpg?blah=1"> </body> </html> If that doesn't work in your situation, let me know and I can make some suggestions, however that technique has been successful for me on most occasions. Obviously your implementation will be slightly different :) Also, the Expiry tag is probably not needed, but it can't hurt. Regards, sycophant-ga |
jhabley-ga
rated this answer:
Perfect - works like a charm. |
|
Subject:
Re: META refresh for web cam images too
From: guymac-ga on 11 Feb 2003 20:45 PST |
If you can take care of the problem at the source, it will be easier than various browser tricks. The web server that is sending the images should be setting the Last-Modified and Expires HTTP headers. It should also send the various no-cache HTTP directives. That way when the browser requests the image, it will know to not cache it. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |