...

View Full Version : deleting temp internet files



diwakar
09-21-2005, 07:31 AM
Hi

Can anybody suggest me a way using javascript to delete the static content like images in the temporary internet files.

glenngv
09-21-2005, 08:01 AM
Obviously for security reasons, Javascript has normally no access to Temporary Internet Files folder or to any user directory for that matter. You can probably do it with an ActiveX but that will display a security prompt that needs user approval.

TNO
09-21-2005, 11:03 AM
Just a guess but, do you want this because you are trying to protect images on your website?

diwakar
09-21-2005, 01:13 PM
no this is not for protecting the images but for but to avoid caching

nikkiH
09-21-2005, 03:35 PM
Then use the no-cache headers and whatnot.
This is not a job for javascript unless you're making a utility that runs on the user's PC or something.

You can never 100% guarantee that your images will not be cached either on the user's PC or a proxy server along the way.
But you can come close.

diwakar
09-22-2005, 06:13 AM
thank u very much guys for every thing

rm-f
09-22-2005, 04:18 PM
You can never 100% guarantee that your images will not be cached either on the user's PC or a proxy server along the way.

workaround:
dynamically generate the image name on server and process GET pic with a CGI.
somthing like:
static.htm
<img src="myPic.jpg">

to:

dynWorkAround.asp
s = "<img src=""myPic" + Session.SessionID + localSeq + ".jpg"">"
and have some CGI which retuns myPic.jpg on myPic" + Session.SessionID + localSeq + ".jpg"" request



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum