Deleting temporary internet files with javascript...

P

phpninja

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,
(e-mail address removed)
 
G

Grant Wagner

phpninja said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top