Is there a way to force browsers to refresh/download images?

后端 未结 14 2253
囚心锁ツ
囚心锁ツ 2020-11-29 01:21

I have a problem where users are reporting that their images aren\'t being uploaded and the old ones are still there. On closer inspection the new images are there, they jus

14条回答
  •  误落风尘
    2020-11-29 02:01

    I had come up with this issue some times ago. And I was getting data through JSON in AJAX. So what I did is, I just added a Math.random() Javascript function and It worked like a charm. The backend I used was a flask.

提交回复
热议问题