I develop a simple overlay to preview image in full size.
I use "cache: false" to prevent caching.
The code is simple:
$.ajax({
url: urlFull,
cache: false,
success: function(html){
// display image
},
error: function(XMLHttpRequest, textStatus, errorThrown ) {
// display error
}
});
The problem is - When image file will be replaced by another, browser will always show the old one, regardless of "cache: false" option was set.
This issue appears under Safari 5.0 (6533.16) and Chrome 5.0.375.99.
In Firefox 3.6.3 it works as expected (no caching)
I cannot control server-side logic, because i preload a regular file, without calling controller actions in rails.
Is there any workaround of this problem ? Maybe, i can intercept the response with Rails server and tweak some headers ? ... I developing under localhost.
Thanks.