Firefox不重新加载图像具有相同的网址,直到刷新。如何强制铬不重新加载图像具有相同的网址,直到页面刷新,就像firefox
$("#a").click(function(){$("#img").attr("src","img.php?id=3");});
<img id="img" src="img.php?id=3">
//the two line above are in the same html page.And when the html page is loaded
// in the browser, i open a new tab and go to the php page that includes
//the line below.
mysql_query("update images set data=$data where id=3");//changing the image here
然后我回去的HTML页面,然后点击#A,Firefox中的旧图像被显示,如果与ID = 2的图像被改变或没有,除非HTML页面刷新它不要求MySQL的。但是在chrome中显示新的,已更改的图像。它会再次询问mysql,不关心url是否仍然相同。
我希望Chrome的行为像firefox.Tried设置过期,最后修改等标题为没有缓存,但它的工作方式不同。就我感觉它没有缓存什么即时通讯寻找。反正,这对我来说是一个非常重要的问题,我将不胜感激任何帮助。
你可以发布您的img.php和第一页的全貌,我没有得到你想要的东西做 –