The PHP applicationg I'm making right now uploads an image from my harddrive to the server. This works perfectly, however the images seems to cache to the old version. So say I upload an image to replace an older image via my application. It then says successfully uploaded image, and it does work, however the browser is caching the older image - so it looks like nothing was uploaded. If I hit ctrl+refresh I can see the new image so I know it is working.
The only possible reason I can think of is that when one image replaces another the new image takes on the same name as the other image. So say the first image is image1.jpg, then I go in and upload a new image, well my application saves it to the server as image1.jpg again, even though it is a new image. Is this what is causing the caching, and is there a way around it?
Thanks in advance,
Ben