Webcam Image Not Current

I am unable to figure out how to make sure my webcam page (Index of /webcam) displays the most current image. I always have to reload the page before I see the correct image. I added:


<meta http-equiv="expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />

but it doesn’t seem to work. How/where should the code should be inserted into the code? Is it possible my browser is ignoring the statements I added and caching the page and that’s why I don’t see the correct image?


wxwebcam.php.txt (2.92 KB)

Hi, not sure if this is the same thing that I had with my webcam image not up dating , but Niko gave me some code to put in the htaccess file, take a look here hope this helps.

teal.

Thanks Teal (and Niko), this appears to work for me…

add ?<?php echo rand(); ?>

like this:

img src="http://wilneyweather.co.uk/jpgwebcam.jpg?<?php echo rand(); ?>"

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.