Today I’m going to show you how to clear browser cache, temp files, history, and cookies each time you close IE (Internet Explorer.) You can do this with most modern browsers including Firefox; however, in IE, it’s even easier. Here’s how you do it.
How-To Automatically Clear IE9 Temporary Files at Browser Close
Open Internet Explorer 7, click Tools, Internet Options
Click Advanced Tab, Scroll Down and Check the box Empty Temporary Internet Files folder when browser is closed Click OK, and you’re DONE!
It’s also possible to remove all the Browser History Files, Cookies, Temp Files, etc. using one of the commands below: Delete Temporary Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
Delete Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
Delete History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
Delete Form Data:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
Delete Passwords:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
Delete All
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
Delete All (Also delete files and settings stored by add-ons)
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
Now, you can either run these commands from a CMD line, or from the Start, Start Search Run Box in Vista OR, even better from a Batch File. The batch file is a nice touch because you can create it on your desktop and click on it at will, without having to remember the commands here from groovyPost. Now I understand everyone knows how to set up a Batch File to execute code, but if you need help, take a look at my next article on how to create a Batch File to Delete IE7 Browser History and Temp Files. Thanks Thanks for your post. Unfortunately I’ve tried this in IE 7 and while it does clear the temporary files upon exiting, the cookies still remain. The RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2 command works like a charm but I want it to make it easy for the users to clean the cookies without having to run/remember any other commands upon exiting IE 7. Any ideas? Thanks; Ramon Having gone through all the options under Internet Options, there is a “Delete Browsing History on Exit” option, but the Settings section does not have anything to do with what is deleted. Strangely, there is a manual erase button which does allow you to choose what to immediately delete, but it does not appear to have anything to do with the automatic settings. The end result is I want to erase all cookies and cache when exiting, but not saved passwords and for data. Any suggestions? I would love to run a script each hour that will remove all personal certificates. Thanks in advance. Comment Name * Email *
Δ Save my name and email and send me emails as new comments are made to this post.