How to force a web browser NOT to cache images

后端 未结 17 614
太阳男子
太阳男子 2020-11-22 13:51

Background

I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML

17条回答
  •  隐瞒了意图╮
    2020-11-22 14:35

    When uploading an image, its filename is not kept in the database. It is renamed as Image.jpg (to simply things out when using it).

    Change this, and you've fixed your problem. I use timestamps, as with the solutions proposed above: Image-.jpg

    Presumably, whatever problems you're avoiding by keeping the same filename for the image can be overcome, but you don't say what they are.

提交回复
热议问题