Deleting temporary internet files with javascript...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • phpninja

    #1

    Deleting temporary internet files with javascript...

    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,
    phpninja@gmail. com
  • Grant Wagner

    #2
    Re: Deleting temporary internet files with javascript...

    phpninja wrote:
    [color=blue]
    > Greetings,
    >
    > I was wondering if it is possible to delete someone's
    > temporary internet files with javascript?[/color]

    No. You can not manipulate file on the local file system in the default
    security environment.
    [color=blue]
    > 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.[/color]

    When you build the URL you forward the end-user to, add something random
    to the end of it:

    Response.addHea der("Location", "yourFile.pdf?t s=" + (+new Date())); //
    example only
    [color=blue]
    > 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'.[/color]

    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.
    [color=blue]
    > Ive seen
    > some code around for delphi, but javascript is the only conclusion i
    > have came up with.. Thanks[/color]

    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 <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    Working...