Refres /Reload image in browser after it is changed on server
Posted: 28 Apr 2015, 14:23
Hello,
I have a script that the user can upload and delete images on server. The issue I am running into is that when the user changes his image on server, the image doesn't change in browser when the page is reloaded; he /she must delete the browser cache to see the new image.
How can I make so to auto-refresh /Reload the image in browser when the user upload a new image (The image keeps the same name on server)? Any ideas?
- This is the code that adds the images in the page:
I have a script that the user can upload and delete images on server. The issue I am running into is that when the user changes his image on server, the image doesn't change in browser when the page is reloaded; he /she must delete the browser cache to see the new image.
How can I make so to auto-refresh /Reload the image in browser when the user upload a new image (The image keeps the same name on server)? Any ideas?
- This is the code that adds the images in the page:
Code: Select all
<?php
for($i = $first_foto; $i <= $total_fotos; $i++) {
echo '<a href="'.$imgdir.'/'. $i .'_big.jpg" rel="next'.$id.'"><img src="'.$imgdir.'/'. $i .'_small.jpg" width="135" alt=" '. $i .' " title="Foto '.$tip_anunt.'" alt="" /></a>';
}
?>