How to Make Private Browsing on Safari Truly Private

How to Make Private Browsing on Safari Truly Private

There comes a time when we may be searching online and don’t want the browser to remember our footsteps. The reasons don’t always have to be what we obviously think of as the main reason; for example, sometimes, you may not want Safari to remember your passwords or prompt you to enter your password when surfing the web.

Whatever the reason, we may think that we are totally in the clear with Private Browsing on Safari and the other browsers on a Mac. However, a quick Terminal command can bring up every website you’ve visited. How do you do this? Also, how do you clear your tracks for good? We will provide both answers and more today.

What Does Private Browsing Do?

When activated, Private Browsing on Safari prevents your browsing history from being kept in the history tab of the application. Along with this, it doesn’t autofill information that you have saved in the browser. In this mode, you essentially become incognito and any references of previous use is essentially hidden when you are in private mode.

For example: if you are on Facebook or filling out a form and some information or your login is already filled in in the spaces provided, this is called autofill. It’s activated by simply clicking Safari next to the Apple symbol in the menubar and selecting Private Browsing, then clicking “OK” to the prompt.

The reasons behind private mode differ for each individual. While we won’t go into all of those reasons, one thing that is important to remember is that private browsing doesn’t forget the websites you visit. As we will see later on, Macs keep a second copy of the websites you visit in either mode. If you are in frantic mode looking for a solution to this, look no further.

The Terminal Archive

While Safari does a good job of keeping your search history out of prying eyes in the history tab, there is a less-than-obvious way to view a full list of visited websites on Mac. This is done in Terminal; the command-line emulator that allows you to make changes to your Mac.

Terminal is located in the Utilities folder on your Mac. Once activated, simply add the command:

dscacheutil -cachedump -entries Host

Once you hit “enter”, a list of the visited sites appear. Showing only the domains, the sites appear in a format of:

Key: h_name :(website domain)ipv4 :1

However, there’s no need to fear—there is a way you can clear this information from Terminal with a command that’s just as simple.

Clearing Your Tracks

Just as simply as you were able to enter the command to view the websites, you can clear the cache that Terminal showed you with the comamnd:

dscacheutil -flushcache

As the command denotes, this literally “flushes” the domains from Terminal. This does not prevent the record from continuing to be recorded for future sites, however, so if that’s an issue for you, repeat this process regularly.

Other Browsers and Private Browsing

Other browsers have this form of privacy mode for their service. They promise many of the same things as Safari, but they do not have the same Terminal issue due to how this command only presents websites visited on Safari (the browser Macs come shipped with).

If you use Firefox, you’ll notice that its private mode is also known as Private Browsing. Chrome calls private mode Incognito, while Internet Explorer refers to it as InPrivate Browsing. Opera is the newest to the scene, denoting it as Private Tab. Safari is the oldest well-known browser with this feature.

As you can see, despite Private Browsing not being 100% private, Terminal allows for your browser to be. In what ways has Terminal helped your life or allowed you to become more productive? Let us know in the comments below.

Emmanuel Banks is a technology writer based in Northern Virginia. The former Editorial Director for Mountain View, CA-based startup, Teens in Tech, Emmanuel has also been a part of the Lifehack team since November 2012. Emmanuel is involved in HTML/CSS coding, consulting startups, and travel.