By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,280 Members | 2,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,280 IT Pros & Developers. It's quick & easy.

Deleting temporary internet files with javascript...

P: n/a
Greetings,

I was wondering if it is possible to delete someone's
temporary internet files with javascript? Basically I'm am using a PDF
module called HTML_ToPDF. The pdf module takes some output based on
queries and creates a pdf, and it works great. My problem is, if i
make a change to the data in the database, then rerun that exact pdf
routine (done by clicking a form button that reposts the data), the
pdf that is refreshed in the browser is not the updated data
reflecting the changes i just made. For some reason the data is being
retained in the browsers temporary internet files (cache) for this pdf
module. So I go into Tools ----> Internet Options -----> General
settings tab.. ---> temporary internet files, and I clean them out,
even the ones that are 'offline'. Anyhow i refresh the data again for
the pdf and the updated values show. Which tells me that I somehow
need to delete the user's temporary internet files before this PDF is
processed. I'm not sure if there is a delete file function for JS, but
my only ideas have been something like get a list of the existing temp
files, then writing nothing to the existing files so that they dont
have any data in temp.. has anyone ran into this, or does anyone have
any code that will delete the temporary internet files in Internet
Explorer (please no firefox flames, this has to be for I.E.). Ive seen
some code around for delphi, but javascript is the only conclusion i
have came up with.. Thanks

Regaurds,
ph******@gmail.com
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
phpninja wrote:
Greetings,

I was wondering if it is possible to delete someone's
temporary internet files with javascript?
No. You can not manipulate file on the local file system in the default
security environment.
Basically I'm am using a PDF
module called HTML_ToPDF. The pdf module takes some output based on
queries and creates a pdf, and it works great. My problem is, if i
make a change to the data in the database, then rerun that exact pdf
routine (done by clicking a form button that reposts the data), the
pdf that is refreshed in the browser is not the updated data
reflecting the changes i just made.
When you build the URL you forward the end-user to, add something random
to the end of it:

Response.addHeader("Location", "yourFile.pdf?ts=" + (+new Date())); //
example only
For some reason the data is being
retained in the browsers temporary internet files (cache) for this pdf
module. So I go into Tools ----> Internet Options -----> General
settings tab.. ---> temporary internet files, and I clean them out,
even the ones that are 'offline'.
What if I'm not using Internet Explorer, then even if you could delete
files from "Temporary Internet Files" it wouldn't do you any good.
Ive seen
some code around for delphi, but javascript is the only conclusion i
have came up with.. Thanks


Fix this on the server, where it should be fixed. Again, this is done by
appending something to the URL of the generated PDF to make it unique,
even if it's the same name.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.