Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    deleting temp internet files

    Hi

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

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    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.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    TNO
    TNO is offline
    Regular Coder
    Join Date
    Apr 2005
    Posts
    213
    Thanks
    2
    Thanked 1 Time in 1 Post
    Just a guess but, do you want this because you are trying to protect images on your website?

  • #4
    New Coder
    Join Date
    Jun 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    not for protection

    no this is not for protecting the images but for but to avoid caching

  • #5
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    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.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #6
    New Coder
    Join Date
    Jun 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    thank u very much guys for every thing

  • #7
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    rm -f /


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •