Does anyone know how you could go about making a program to delete your internet cache every time the refresh button is clicked?
Printable View
Does anyone know how you could go about making a program to delete your internet cache every time the refresh button is clicked?
Why don't you just have your browser clear it on exit?
I know Mozilla/Firefox has this option. I'll bet most others do too... Even IE.
There are plenty of freeware programs that you can set to run in the background and periodically clean out your cache. Check out EmpRunner.
I would not be inclined to interfere with an existing browser function. I would get a cache cleaner like AngelicKnight has suggested and run it from a hotkey...........that would be safer and more stable? And you wouldn't have to worry about browser upgrades.
Just a thought?
Greetings All:
The EASIEST way to do this, is hold the shift key down when you hit refresh (assuming you're using IE, not sure if this works with the others or not). This will expire the cache for the site that you are visiting, and pull the content fresh from that site's servers.
If you are more worried about privacy than the content's "Freshness", you might want to look to commercial solutions such as "Evidence Eliminator". It will clear your cache, page file, "Recently Accessed" files for a bunch of different programs, etc. etc. blah blah.
hmm I was wondering,why cant you do the same with a batch file?I tried it,but it doesnt seem to be able to delete the cookies n stuff
Are you trying to cheat on www.hackthissite.org? Getting others to do the work for you?
It got defaced though so that challenge is now non-existent.
(For those who don't know, there was a programming challenge on that site where you must write a program that will clear browser cache when you click the Refresh button.)
But back to the topic... What I'd do is use Windows API. Make it capture mouse clicks, and if the click is inside a certain set of X, Y coordinates, then run some function to delete those files/folders. The bad part about this is the browser window has to always be maximized or in the same position.
It sounds fairly straightforward, but I don't think I'm up to the challenge. I just clear Mozilla's cache manually every once in a while. Works for me.
mjk
Jareds411 -
From your profile, it looks like you are running WindowsXP . . . if not, please correct me and I can adjust my post. Because of my own concern with IE's cache, specifically the index.dat files, I've tried and disgarded most of the freeware, shareware and commercial products claiming to clear/clean the index.dat files. At the Hardware Hell forum, I found various batch file solutions for Microsoft OS's ranging from Windows 98 through Windows XP. Here is one for Windows XP:
__________________________________________________
Privacy for Windows XP
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
rem WinXP, cleans cookies, cache, temp, history, index.dat
rem put in startup folder and it'll clean each time upon logging in
rem save to text file named something like cleanxp.cmd
rem to clean index.dat files must logoff completely. Switch users wont' cut it.
rem
@echo on
cd %homedrive%%homepath%
rd /s/q locals~1\tempor~1
rd /s/q locals~1\temp\tempor~1
rd /s/q cookies
rd /s/q temp\cookies
rd /s/q locals~1\history
rd /s/q locals~1\temp\history
rd /s/q recent
md recent
rd /s/q locals~1\temp
md locals~1\temp
-------------------------------------------------------------------
Windows Registry Editor Version 5.00
;save to text named something like url_recent.reg works for 2000 and XP
; cleans IE URL drop down list and recent docs, suggest placing in startup folder
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs]
[-HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs]
__________________________________________________
PLEASE NOTE: I have NOT used this batch file/registry fix as the systems I work on are primarily 98 or 2K - so use at your own risk. It has been a while since I checked back at their forum (www.hardwarehell.com) so there may be additions and/or updates to what I originally found from their contributors. If you decide you might want to use a batch file, I would strongly suggest checking for the latest info.
Another tried and true info gathering resource is Google. Searching for index.dat, cache, cookies, history, temporary internet files, etc., will supply you with all sorts of programs and data on the subject. I hope this has been a little helpful.
V.
I don't understand why everyone wants to clear the cache the hard way, manually going into tools and internet options and clearing cache from there works just fine for me.
:)
There are several batch file recipies to be found on the 'net.
Since I'm sort of a newb to the CLI, I opted for another way,
which I commented on a few days ago in another thread.
If you have Spybot Search & Destroy, you can shredd your
index.dat files with it.
I have XP Pro:
IE must not be running, and hidden files must be viewable. Drill into your Temporary Internet Files folder or
search for index.dat in explorer and drag and drop it/them into the 'shredder window' of Spybot. Chop away. You'll have to restart your box.
A nickel and two cents,
What is www.hackthissite.org? I just got some flame about some hackers...Quote:
Originally posted here by mjk
Are you trying to cheat on www.hackthissite.org? Getting others to do the work for you?
It got defaced though so that challenge is now non-existent.
(For those who don't know, there was a programming challenge on that site where you must write a program that will clear browser cache when you click the Refresh button.)
But back to the topic... What I'd do is use Windows API. Make it capture mouse clicks, and if the click is inside a certain set of X, Y coordinates, then run some function to delete those files/folders. The bad part about this is the browser window has to always be maximized or in the same position.
It sounds fairly straightforward, but I don't think I'm up to the challenge. I just clear Mozilla's cache manually every once in a while. Works for me.
mjk
www.hackthissite.org is one of those wargame sites that lets you test your hacking ability legaly on there hacking misson game thingies (if that makes sense lol) The tests are good but the problem is there site always has crazy evil admins that mess everything up, so they have to weed out the crazy evil admins and get rid of them before it happens again. It just recently happened and I lost all my completed missions and points! So I pretty much stopped going there. But you learn alot, I suggest you go check it out and see what they're all about.
Sorry but i'm a little crazy mood right now :p
Okay, sorry for being a little rude in my last post. It was just that they had that programming challenge and you just happened to post the exact thing.
But anyways, you haven't stated why you want to clear the cache when the refresh button is clicked. What is the advantage of doing this, instead of clearing it when the browser exits? Or clearing it manually?
mjk
The other suggestions listed work perfectly for my needs. I just had the refresh button idea because I thought it'd be neat, but the other things work fine. :-)