Is there any way in JavaScript alone you can wait until an image file exists on the server?
For a better explanation of my current situation users can press a button to get an image rendered but as of now they have to refresh for it to load. I wanted a better way to do this by deleting the previous image and then waited until a new one existed on the server which at that point it would show the new Image.