I've read every question (I believe) about image caching and they mostly address the refesh issue. What I need to do instead, is to "get rid" once and for all of cached images loaded through a JS script.
Backrgound: as part of a tool available on a public website, I need to load images from random websites and analyze them, without the need for displaying them. In summary it's just a loop with a function like this (which works fine):
var img = new Image();
img.onload = function(){//analysys};
img.src = curImg.url;
The problem is that in the process there might be the occasional inappropriate image, which I can't leave on the user's device and asking the user to empty the browser's cache is truly the very last resort.
Having no control on the server side, I searched for ways to prevent client-side caching and tried the various META
tags without success. The last idea I'm left with is to "trick" the browser into replacing a cached image with one that I provide, but I have no idea if this is something that can be done in JS at all (at least without "illegal" hacks).
Is there any way to get rid of the unwanted images?