How to clear browser cache when re-uploading image with same filename, in php?

后端 未结 8 1526
灰色年华
灰色年华 2021-02-18 19:05

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

8条回答
  •  灰色年华
    2021-02-18 19:45

    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');
    
     
    

    after .jpg add date and time like this. hope this will help you.

提交回复
热议问题