Safari: Use a Shortcut to Clear Your History

| TMO Quick Tip

So picture it. You’re browsing, and you hear footsteps coming down the hallway. Oh, no! You don’t want your mom/spouse/teacher/hedgehog to know what you’re looking at! Crap crap CRAP where’s that “Clear History” command?!

I’m here for you, dear readers, even with your weird Internet habits. We’re going to configure a keyboard shortcut to clear your browsing history, and it’s gonna be awesome. So to begin, visit System Preferences> Keyboard… 

…and click on the “Shortcuts” tab. From the left-hand list, choose “App Shortcuts,” and then you’ll click the plus button to add a new one.

On the pop-up that appears, fill it in as below. Note that you must include the ellipsis after the “Clear History” command, or this won’t work (though it doesn’t matter if it’s an actual ellipsis character or three periods).

And of course, once you reach that “Keyboard Shortcut” field, you can press any one you’d like to use. I’ve used Control-Option-H, but you do whatever feels good to you.

Afterward, click “Add,” and then go to Safari and test it out. When you do, you should see a box with a warning pop up, which you’ll need to agree to.

The lucky part about this, though, is that “Clear” on that warning box is already highlighted, so you can confirm that option by pressing Return after the box appears. So whenever you hear that special someone coming down the hall, just press your new keyboard shortcut followed by Return, and your history will be deleted. You’ll be in the clear. You’ll be good to go.

Unless that special someone eventually asks you why nothing is in your history at all. In that case, you’re on your own.

Popular TMO Stories



Or you could just use a private browsing window and Command-W when done. No custom shortcut required and regular browsing history remains intact.  wink


@freediverx: Agreed about private browsing to prevent any ‘tracks’ being left behind. (This will get even better in Yosemite, in which we’ll be able to turn private browsing for just the browser windows that require it.) However, I find that it’s sometimes quicker to swipe over to another space than it is to actually get Safari to quit. Before Spaces was available, I’d use cmd-h to hide Safari. Of course, if you’re partaking of anything that includes sound, then quitting really is the best option.


++ on the private browsing method.  And, you can also use the same Keyboard Shortcut method with Private Browsing.

And keeping your history clean is not just for adult sites.. I remember shopping for an engagement ring (years ago) with private browsing on.

Lee Dronick

Thanks Melissa. As Brett said there are other reasons for clearing history. Hmmmm, can a shortcut me made for clearing browser cache?

Melissa Holt

Hi all! Thanks for the comments.

For what it’s worth, I agree that Private Browsing is generally the way to go; however, I often forget to turn it on. Um, I mean, I NEVER have a reason to clear my history, so…yeah. wink

Hey, Lee! There already is a shortcut for clearing caches, but you have to turn the Develop menu on under Safari> Preferences> Advanced first. Once you do that, the shortcut is Option-Command-E. Hope that helps!


Lee Dronick

Thanks Melissa, this is another example of forgetting that many menu items have keyboard shortcuts. I do have the Develop menu on, in OSX, and usually disable caches checked, but many websites still cache.

Log in to comment (TMO, Twitter or Facebook) or Register for a TMO account