0
Dear, dropzone use (https://www.dropzonejs.com) on my website and thumbnails (which are on the server) return when deleted using Chrome. In IE and Firefox they work perfectly.
After doing a lot of code redoing, testing solutions, etc., I discovered that by pressing the Shift+F5 keys Chrome reloads the photos from the server instead of the cache and the thumbnails are deleted. Only F5 doesn’t work. The javascript equivalent would be Location.Reload(true) but this does not work in Chrome. Below the code:
// Recupera imagens
con1.open("GET", arqpath1, true);
con1.send();
...
// Apaga arquivo no servidor
this.on("removedfile", function(file) {
$.ajax({
url: "delfotoprodedit.asp",
method: "POST",
data: {
arqname: file.name
},
success: function(data) {
document.location.reload(true);
}
});
});
I’ve tried a few examples to reload the page without success: http://www.phpied.com/files/location-location/location-location.html
See more examples: Chrome (59.0.3071.115): window.location.Reload(true) reloads from cache, not server as it should...
Would anyone have a solution? Thank you
The following is the explanation: https://blogs.msdn.microsoft.com/ieinternals/2010/07/understanding-conditional-requests-and-refresh/
– Lollipop
I put:<meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" /> Didn’t work, keeps loading the cache.
– Junior1967