My homepage is set to yahoo.com. I know to use Yahoo, one has to accept
hundreds of cookies and I get hundreds. Is there any way one can program the
computer to automatically remove the cookies?
Yes and no.
Yes, we can absolutely set something up that will automatically remove
cookies, say every night. I’ll show you how to do that.
No, in that it’s not a simple function built into the system.
There is a simple function built into many browsers, but it perhaps
does more than you want.
Current browsers offer something called “InPrivate” (IE), “Incognito” (Chrome), or “Private” (FireFox) browsing mode.
But then, so are a lot of other things.
Along with the cookies, almost everything else associated with the browsing session is also deleted, including all history (typically including browser, search, download, and web form history) and any temporary internet files. Downloads and bookmarks that you make while in this mode are typically kept.
If that’s all acceptable to you, then simply remember to enter in to your browser’s appropriate version of Private browsing, and when you’re done, all of your cookies will be deleted.
A more flexible alternative: CCleaner
I’ve written about CCleaner before. It’s a general purpose cleaning tool for Windows.
And one of the things that it cleans and cleans well are cookies.
When you install CCleaner, it’ll ask an interesting question:
Answer yes to this. I’ll go into more detail about this useful setting shortly.
To clean only cookies, in the default view on the Cleaner tab, make sure that only Cookies is selected.
In the Applications tab, make sure that you select only Cookies for any browsers that the CCleaner has detected there as well.
Click Analyze to see what CCleaner will clean, and make sure that only cookies are listed. (If there are more, double-check the settings in the left pane, making sure to scroll down therein to see all the settings.)
Once you’re satisfied that it’s going to clean what you want, click Run Cleaner.
Your cookies have been cleaned.
Well… most of your cookies.
In CCleaner, click the Options icon on the left, and then the Cookies:
In the right column are domains for which CCleaner actually doesn’t clean cookies. These are the cookies alluded to by that “Intelligently scan for cookies to keep?” setup option. By keeping cookies for these domains, your login state or user ID is preserved. Normally, if these cookies are removed, you’ll need to login from scratch to these services each time, even if you say “remember me” when logging in. By preserving these cookies, you can preserve that state.
If after using your system for a while, after cleaning cookies, you decide that you want to add a domain to the exclusion list, it’s fairly simple.
Run the Analyze step again, and then return to this Cookies section of the Options page.
After cleaning cookies, you can see that I visited ask-leo.com, where cookies from ask-leo.com (to remember your name in the comment form), forms.aweber.com (to keep you from seeing the newsletter pop-up more than once every 180 days), lastpass.com (the password manager that I use) and doubleclick.net (the advertising service used on the site) have been created.
Let’s say that we want to allow cookies from ask-leo.com to be preserved. Click ask-leo.com in the list, click the “->” arrow:
You can see that “ask-leo.com” has been added to the list of domains for which cookies will be kept.
Scheduling CCleaner to run nightly
Now that we’ve determined what settings we want in CCleaner, and have updated the list of domains for which cookies are not be deleted, the last remaining step is to configure CCleaner to run nightly.
Start by visiting CCleaner’s Options page again and this time, click Advanced.
Make sure that “Save all settings to INI file” is checked.
You can actually close CCleaner now.
Click the Start orb, All Programs, Accessories, System Tools, Task Scheduler:
Alternately, you can type “task scheduler” into the Windows search box.
In the resulting window, click Create Basic Task…:
This will fire up the Create Task Wizard.
In the first page, enter a name for the task:
Click Next and you’ll be asked to define a “trigger”. In our case, this is time based and we want this to happen daily.
Click Next and you’ll be asked specifically when each day you want this task to happen:
You can choose any time that you like – it defaults to the current time. I tend to pick a time at night when I’m not likely to be using my computer.
Click Next and you’ll be asked what to do. Choose Start a program and click Next again to define what program it is that we want to run.
Use the Browse… button to locate CCleaner.exe – it’ll normally be in either “C:\Program Files\CCleaner\CCleaner.exe” or perhaps “C:\Program Files (x86)\CCleaner\CCleaner.exe”.
Make sure to include /AUTO as an optional argument as shown. This tells CCleaner when it’s run that it’s being run automatically and should not display a user interface or wait for user input.
Click Next to be taken to the not-quite-final summary:
Make certain to check “Open the properties dialog for this task when I click Finish”, and click Finish.
On this page, make sure to check “run with highest privileges” so that CCleaner can do its job.
Optionally, you can select “Run whether user is logged on”, in which case, you’ll be prompted for a password to be stored (encrypted) with the task.
Back in the Task Scheduler’s main window, you can click “Task Scheduler Library” to see your new task in the list. Right-click the task and click Run to run it right away.
If you do, chances are that it’ll be fairly quick, so you might not even notice it.
But you now have a nightly cookie cleanup.
CCleaner can do more
As you probably noticed, we bypassed many, many options in CCleaner that you could also choose to run at night. Simply choose those options as you go if you like.
I happen to run CCleaner nightly, not for cookie cleaning but rather to delete temporary files. I do this before my nightly backup so as to keep the backup that much smaller.
Finally, note that if you use CCleaner manually, you may want to go back and uncheck the “Save settings to INI file.” With that checked, any changes that you make will be saved and therefore happen the next time CCleaner runs on its schedule.