/    Sign up×
Community /Pin to ProfileBookmark

Refresh an image in cache??

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.

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@NedalsauthorDec 18.2002 — 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.
Copy linkTweet thisAlerts:
@salmanshafiqJul 17.2008 — Thanks it's very help full for me i was struck on this issue.

? thanks alot
×

Success!

Help @Nedals spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...