I’m writing a php script to crop an image.
The script overwrites the ‘old’ image with the ‘new’ one, but when I reload the page (which is supposed to pickup the new image) I still see the old one.
If i check my hard disk (i’m working on local machine) i can see that the image HAS changed, but the HTML doesn’t pick it up. Maybe it’s a caching problem?
How can I solve it?
thanks,
Patrick
A common technique for ensuring images are never cached is to add the current time in miliseconds to the end of the image’s url as a parameter. Your web server will ignore the parameter and serve the same image every time, but your browser (and any intermediate cache) will register a cache miss because the url for the image is different.