how do delete all of the user's Temporary Internet Files?

Discussion in 'JavaScript' started by Betty_S, Apr 10, 2007.

  1. #1
    how do delete all of the user's Temporary Internet Files?
     
    Betty_S, Apr 10, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Not possible with JavaScript. Which is good.
     
    nico_swd, Apr 10, 2007 IP
  3. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You could do this with ActiveX I guess, but I'm sure there's a cleaner solution to what you're trying to do.
     
    giraph, Apr 10, 2007 IP
  4. Adi

    Adi Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You are looking on the problem from the wrong end - You shouldn't try to clear the user's cache since it is something you can't control (there might be a hack somewhere which allows you to do it but that solution will not last long)

    You should spend time to define a "smart" (domain specific) cache model - for example set different expiration to different folders.
    You should also understand that some elements can't be cached - for example: If you have a picture which changes every 10 min.
    For this situation I would upload that picture to flicker or other picture server and set the link to that server ==> saved you bandwidth - which has the same effect as caching.

    There is other solution - write your own cache handler by capturing the HTTP requests coming to the server- this is done using the ETag HTTP header field .

    Good luck
     
    Adi, Apr 10, 2007 IP
  5. BaHKa7a

    BaHKa7a Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    try CCleaner
     
    BaHKa7a, Apr 25, 2007 IP
  6. Webice

    Webice Peon

    Messages:
    49
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can't delete the users temporary files with javascript.

    I thing you are approving your problem the wrong way.

    You can tell the browser to cache or not to cache the files from xhtml.
     
    Webice, Apr 25, 2007 IP
  7. Dude111

    Dude111 Guest

    Messages:
    1,153
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Or Disk Cleaner :)
     
    Dude111, May 1, 2007 IP
  8. surfin4dough

    surfin4dough Peon

    Messages:
    182
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    well the only way to permanently remove your computer files and erase your hard drive is to use some hard drive cleaner software.
     
    surfin4dough, Oct 20, 2008 IP
  9. -SiX-

    -SiX- Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    This is a very easy problem.

    Just put this in a text file, save it as "delete all.vbs" and then run it. You need admin rights to all folders for it to work:

    'Written by Liam (SiX) Deeney
    'Freeware with no restrictions

    'This script will delete all users temporary internet files.
    'If you don't know how this works or what it does then do not run it.

    'I accept no liability for this being run outside of the environment
    'for which it was intended.

    'This will only work with Windows XP

    on error resume next

    msgbox "This script will take some time to complete, You will receieve notfication when it is finished. You must remain logged on for it to work. You may continue to work whilst it runs."

    Screen.Mousepointer = vbHourGlass

    const HKEY_LOCAL_MACHINE = &H80000002

    'You can edit this to another computer's name if you have admin rights to it.
    strcomputer = "."

    set ObjRegistry=GetObject("winmgmts:\\" & strcomputer & "\root\default:StdRegProv")
    set ObjFSO = CreateObject("Scripting.FileSystemObject")

    'create array of paths to users profiles using registry
    strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"

    objRegistry.EnumKey HKEY_LOCAL_MACHINE, strkeypath, arrSubKeys

    For Each objSubKey in arrSubKeys

    'for each profile on the local machine
    strvaluename = "ProfileImagePath"
    strSubPath = strkeypath & "\" & ObjSubKey

    objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE, strSubPath, strValueName, strValue

    'Go through each users' temp internet folder and delete files
    Dim Fol:Fol = strValue & "\Local Settings\Temporary Internet Files\Content.IE5"

    if objFSO.FolderExists(Fol) then

    set f = objFSO.GetFolder(Fol)
    set fc = f.SubFolders

    for each f1 in fc

    f1.delete

    next

    end if

    next

    Screen.MousePointer = vbDefault

    msgbox "Script Complete"
     
    -SiX-, Feb 1, 2011 IP
  10. moshecogan

    moshecogan Active Member

    Messages:
    265
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #10
    Yes, try CCleaner!
     
    moshecogan, Feb 4, 2011 IP