To remove your web history in Safari on a Mac while keeping your cookies and saved website data, you use the History menu’s Clear History option and select a time range, but this method actually removes cookies too. The only built-in way to delete history without touching cookies is to manually delete individual history entries, or use a third-party browser cleaner that offers selective clearing. This article explains exactly what Safari’s options do, how to preserve cookies, and what your real choices are.
What Safari’s “Clear History” Actually Does
When you go to History > Clear History in Safari on macOS, you get a dropdown asking for a time range: the last hour, today, today and yesterday, or all history. What most people don’t realize is that this command does not just delete your browsing history. It also removes:
- Cookies and website data
- Cached files and images
- Your list of frequently visited sites
- Recently closed tabs list
- Some website permissions (like location or camera access)
This is by design. Apple treats history and website data as one bundle for privacy reasons. So if you use that menu command, you cannot keep cookies. The only exception is if you choose a very short time range like “the last hour” — even then, any cookies set in that hour are deleted.
Why You Might Want to Keep Cookies
Cookies are small text files that websites store on your Mac to remember you. They hold login sessions, shopping cart contents, language preferences, and personalized settings. If you clear them, you’ll be logged out of most sites, and you’ll have to re-enter preferences. For people who share a computer or use a public Mac, clearing history without cookies is often a privacy compromise: you want to hide your browsing trail but stay logged into your email or bank.
Method 1: Delete Individual History Entries (Built-in)
The only fully built-in way to remove specific history items without affecting cookies is to delete them one by one:
- Open Safari and go to History > Show All History (or press Command+Y).
- A sidebar appears showing your history grouped by day and site.
- Right-click (or Control-click) on a single entry and choose Delete.
- To delete multiple entries, hold Command and click each one, then right-click and delete.
This method only removes the entries you select. Cookies from those sites remain untouched. The downside is that it’s tedious if you have a lot of history to clear. There’s no “select all” or “clear all except cookies” option in the built-in interface.
Method 2: Use Safari’s Private Browsing for Future Sessions
If your goal is to avoid accumulating history in the first place, use Private Browsing mode. In Safari on Mac, press Shift+Command+N to open a private window. While you browse in that window, Safari does not save your history, cookies, or form data. When you close the private window, everything is discarded. This doesn’t remove existing history, but it prevents new history from being recorded.
Note that private browsing still keeps cookies for the duration of the session — so if you log into a site, it stays logged in until you close the window. But once you close it, all cookies from that session are deleted. This is a good option if you want to browse without leaving traces, but it doesn’t help with already-stored history.
Method 3: Third-Party Cleaners That Separate History and Cookies
Several Mac cleaning apps allow you to selectively clear Safari history while keeping cookies. These tools access Safari’s internal database files and delete only the history records. Popular options include CleanMyMac X, MacBooster, and AppCleaner (though AppCleaner is mainly for uninstalling apps). Be careful: not all cleaners offer this granular control, and some may remove more than you expect.
If you choose a third-party tool, look for one that explicitly lists “Safari history” as a separate checkbox from “cookies” and “cache.” Read reviews and make sure the app is from a reputable developer. Always back up your Safari data before using any cleaning tool, just in case.
What About Safari’s “Manage Website Data” Option?
In Safari’s Preferences (or Settings) under the Privacy tab, there’s a button labeled Manage Website Data. This shows a list of all websites that have stored cookies or other data on your Mac. You can select individual sites and click Remove to delete their cookies. This is the reverse of what you want — it removes cookies but keeps history. However, it’s useful if you want to clear cookies for specific sites while keeping your history intact.
If you accidentally clear all cookies using this screen, you’ll need to log back into every site. There’s no undo. So use it sparingly and only for sites you know you want to log out of.
Common Misconception: “Clear History” Keeps Cookies
Many users believe that Safari’s Clear History command only affects the history list. That’s false. Apple’s own support documentation states that clearing history also removes cookies and other browsing data. This misconception leads to people losing login sessions unexpectedly. If you’ve ever cleared history and found yourself logged out of Gmail or Facebook, that’s why.
Another misconception is that restarting Safari or restarting your Mac clears history. It doesn’t. History is stored on disk and persists until you delete it. Only private browsing windows discard data on close.
Frequently Asked Questions
Can I clear Safari history but keep passwords?
Yes. Passwords are stored separately in the Keychain, not in Safari’s history database. Clearing history or cookies does not affect saved passwords. You can manage passwords in Safari > Preferences > Passwords.
Does clearing history on Mac also clear it on iPhone/iPad?
If you have iCloud Safari enabled, clearing history on one device will remove it from all devices signed into the same Apple ID. This is because history syncs via iCloud. To avoid that, turn off Safari sync in iCloud settings on each device.
Will clearing history slow down or speed up Safari?
Clearing history itself has little effect on speed. Clearing cookies and cache can make pages load slightly slower initially because they need to re-download resources. But if you have a huge history database, clearing it may make the History view more responsive.
Is there a keyboard shortcut to clear history in Safari?
There’s no direct keyboard shortcut for Clear History. You can press Command+Y to open the History view, then use the menu. Some third-party utilities allow you to assign a shortcut, but that’s not built-in.
What happens to open tabs when I clear history?
Clearing history does not close your open tabs. They remain open, but the sites in those tabs will lose their cookies if you cleared cookies too. So you may be logged out of those sites.
Can I recover history after clearing it?
If you have a Time Machine backup, you can restore the Safari history file from before the clear. Without a backup, recovery is very difficult because the data is overwritten. There are third-party recovery tools, but success is not guaranteed.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Delete Picture Kik? How to Remove Photos
- What Happens to X Replies, DMs, and Followers After Deletion?
- Data Breaches That Shook the World
- Disable Google Assistant: Turn It Off on Android & Home
- Resin vs FDM Printers for Miniatures: Detail, Durability, Cost
- Are Networked Implants Safe? What If One Fails?