Question: how to delete temporary internet files using javascript?
Answer: You definitely can't delete a temporary file with javascript. To avoid caching use the no-cache header when sending the image. This way the image will be downloaded every time is requested.