Click to See Complete Forum and Search --> : Refresh an image in cache??


Nedals
12-17-2002, 03:14 PM
This may be an HTML, Javascript or HTTP question. I'm not sure which.

I'm allowing users to post an image to my site. I set the uploaded image name to 'temp.ext' in a Perl script (where 'ext' can only be .gif or .jpg). After upload, the user is sent a new page with the uploaded image. The image is then deleted on the server. All this works as expected and the image is correctly stored in the user's cache.

Here's the problem. If the user decides he/she wants to upload different image (uploaded name is still temp.ext), I need to refresh the cache but cache, of couse, already has temp.ext and does not refesh. Is there a way to force the refresh? If not, any suggestions on how I might accomplish this.

Nedals
12-18-2002, 12:23 AM
Thanks Dave..

Great suggestion!! I ended up creating and returning

imagename.ext?randomstring

in the Perl script (which changes the randomstring with each new image) and it seems to work correctly in both Explorer and Netscape.

salmanshafiq
07-17-2008, 01:41 AM
Thanks it's very help full for me i was struck on this issue.

:) thanks alot