I am trying to refresh an image on a page, but this does not happen. I have an image page, and I need to update these images as needed. To update the image, I upload the image to the lightbox, and then close it. The image on the page should be updated. Now I tried $ ('# imageid'). Attr ('src', newimage). I want to specifically mention here that the name of both the old and the new images is the same. And I feel that this is a problem. If I hardcode any other image, it appears as soon as the lightbox closes. But when I try to update the image by putting the same image name for the 'src' attribute, nothing will happen.
Can someone help me how can I fix this problem and show an updated image.
Thank.
Edit: Could this be a cache?
source
share