没有在IE中更新图像(不清除缓存) [英] didn't update the image (not clear the cache) in IE

查看:99
本文介绍了没有在IE中更新图像(不清除缓存)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的网站上编辑图像后清除图像缓存?



当我更新图像时,它更新成功,但我仍然看到旧图像。我没有看到新的图像,直到我按下ctrl + f5(在IE中)..但它在firefox中运行良好....





是否有任何解决方案.....?

how do i clear the image cache after editing an image on my site?

When Iam updating an image it update successfully but i still see the old image .I don''t see the new image until I press ctrl+f5(in IE).. but its works fine in firefox....


Is any solution.....?

推荐答案

参见 Clear-Your-Browser'-Cache [ ^ ]





注意:对于客户端:



Javascript'的reload()应该接受一个参数,告诉它进行硬重载,即忽略缓存: br $>


location.reload(true);

我不能保证其可靠性,你可能想进一步研究这个问题。 />






干杯,

Edo
See Clear-Your-Browser''s-Cache[^]


NOTE: for client side:

Javascript''s reload() is supposed to accept an argument which tells it to do a hard reload, ie, ignoring the cache:

location.reload(true);
I can''t vouch for its reliability, you may want to investigate this further.



Cheers,
Edo


我认为问题是cookie清除。我建议你应该为你的图像名称添加一些唯一的id,比如datetime,每次页面刷新和浏览器cookie更新时你都会创建唯一的图像名称,你应该看到新图像。休息你可以谷歌这个......
I think problem is of cookie clearence. I suggest you should append some unique id to your image name like datetime which creates unique image name each time page refreshes and browser cookie gets updated and you should see new image. Rest you can google regarding this......


这篇关于没有在IE中更新图像(不清除缓存)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆