当前位置: 动力学知识库 > 问答 > 编程问答 >

How to load Image() in JavaScript without caching it on Safari

问题描述:

On Safari, i would like to load an image in JavaScript like that:

var img = new Image();

var src = ....

But i don't want to put this image in the browser cache.

Any idea ?

FOR SAFARI ONLY.

网友答案:

Check for the User-agent header on server side to see if this request is coming from Safari, then set Cache-Control: no-cache for the response header.

分享给朋友:
您可能感兴趣的文章:
随机阅读: