I have a page which needs to download an image file on onload event but, for all page calls! Now, it downloads the image in first call but in second call it gets from temporary and that is not the thing I want. I need to make some calculations for each load. So I want to delete the file that I download on each load from temporary or something else that forces client to download it from server again.
A javascript solution will be great. Thanks.
No, you can’t do anything at all to the cache using Javascript, but you can change the url of the image so that it’s not in the cache.
Just add a query string to the url of the image, and use the current time to make it unique each time: