I have a listing of items, that also contains an image thumbnail. Sometimes I need to change the thumbnail image, but keep the filename the same. Is there a way to force the bro
You can add last modified date to you image or simply add date and time at the end of you image URL
for Example
$today=date('Y-m-d H:i');
<img class="img-circle pro_pic" src="https://govcard.net/yourimage.jpg?lm=<?php echo $today?>" alt="">
after .jpg add date and time like this. hope this will help you.
Cached images are also invalidated on manual page refresh (pressing F5 in browser). This can be simulated with Javascript method location.reload() being fired on body load. To avoid perpetual reloading, this may take place only once. When the user uploads a new avatar, the ReloadPending request is set persistently in his/her session and it is reset when it's been answered.
<?php
if ($session['ReloadPending'])
{ $session['ReloadPending']=false;
echo "<body onload='location.reload(true);'>";
} else echo "<body>";
?>
Reloading the whole page after avatar upload will cause the page flicker but this happens only once, which, I believe, is acceptable.