Better Private Browsing in Safari 4 via Shortcuts, Confirmation Removal, and Cleanup

August 12, 2009 in Tips & Tricks by Mark

Private Browsing still leaves tracks, we will show you how to easily switch in and out of Private Browsing, and go over a few additional steps for the paranoid people who want to cover their tracks in Safari via Private Browsing shortcuts, confirmation removal, clearing cached data, and excluding cached data in Spotlight searches.

Step 1: About Private Browsing

When you browse the web, Safari stores information about the websites you visit including the content and any user names, passwords, and credit card numbers you enter. Other people who use your computer can view that information. If you don’t want this information stored, use Private Browsing…. If you neglected to turn on Private Browsing before you browsed, choose Safari > Reset Safari.

Truthfully, it leaves alot of tracks on your computer, and while our list doesnt cover everything is should satisfy most.

Step 2: Create Shortcut

Open System Preferences and select Keyboard > Keyboard Shortcuts.

Click the + icon to add a new entry.
Select Safai.app as the Application
Enter Private Browsing as the Menu Title **Use this name, nothing else.
Keyboard Shortcut: Cmd + P

%title%

Step 3: Safari Private Browsing

Close and Re-Open Safari if necessary. Now hit Cmd + P and Safari will not cycle through Private Browsing mode. An additional bonus, it will now not popup the confirmation that asks you if your really wanted to initiate private browsing.

%title%

Step 4: Hide Caches from Spotlight Search

Open System Preferences > Spotlight > Privacy

Click the + icon to add a new entry, navigate to ~/Library/ and select the Caches directory.

Remember ~ means current user. Also, if you wanted to exclude Safari only its in ~/Library/Caches/Metadata/Safari/History

%title%

Step 5: Additional Steps for the Paranoid

In Terminal, type this command:

dscacheutil -cachedump -entries Host

This will display all entired that have been cached by Leopard, including the date and time of last access even if Private browsing was enabled. Reseting Safari will not clear these entries. To clear this from your computer simple enter this command in Terminal.

dscacheutil -flushcache

The cache is cleared once you log our of Leopard. Although while you are logged in anyone (Guests included) can execute the cachedump and view the sites you have visted.

%title%

Step 6: Clear Cache Manually

You can add the this and the previous step into an Automator workflow or application and execute it at specific intravals. We will cover this topic later.

To clear the safari Cache database execute this command in Terminal:

rm -R ~/Library/Caches/com.apple.Safari/Cache.db

%title%