I am displaying an image on my web page which is present in the web-inf resources folder. When I click a button, a jquery ajax call is made to the server and the image in the web-inf folder is replaced with a new image but the name is same and immediately I want to display the new image instead of old image without reloading the webpage. I could do it by reloading but i don't want because all this is happening in a dialog. If I reload the dialog disappears. In the browser console I could identify that the url of img resource is pointed to new image only but the old image is being displayed. I also tried cache:false in ajax call.
Thanks in advance.