Author Topic: Cache  (Read 214 times)

0 Members and 1 Guest are viewing this topic.

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Cache
« on: February 18, 2024, 08:13:32 AM »
My webcam image uploads and updates fine. However, the updated imagine won't display unless I clear my cache. I have to do this everytime I load my site. I have to do it on my PC and phone.

Is this an issue with my website, my hosting service, or an internet issue?

empw.net

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Cache
« Reply #1 on: February 18, 2024, 10:16:58 AM »
Easy to fix..

change the line:

<img src="cam.jpg"

to

<img src="cam.jpg?t=<?php echo time(); ?>"

which should force the browser to reload a fresh copy each time the page is refreshed.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything