How to Manage Cookies in the Safari Browser

Excessive Cookies Can Slow Down Any Web Browser

Macro image of running Safari web browser on an iPad
ymgerman / Getty Images

There has always been a trade-off in allowing websites and third-party advertisers to store cookies in Safari, or for that matter, any browser. Most of us are already aware of the security and tracking implications that come with accepting cookies, but there's a third issue to be aware of: the overall performance of your web browser, including how it interacts with some of your favorite websites.

Cookie Corruption Leads to a Poor Safari Experience

If you let your web browser store cookies over a long period of time, a number of bad things can happen. A large collection of cookies can take up more hard drive space than you might think. Cookies eventually get out of date, so they're not only taking up drive space but also wasting it because they're no longer serving any purpose. Last but not least, cookies can become corrupt from Safari lockups, power outages, unplanned Mac shutdowns, and other events. Eventually, you're likely to find that Safari and some websites no longer work well together, or work together at all.

Even worse, troubleshooting why Safari and a website fail to work well together is rarely easy. I don't know how many times I've seen or heard about web developers simply throwing up their hands and saying they have no idea what's wrong. They often recommend using a PC instead, because they know their site works with Windows and Explorer.

In most cases, the site normally works well with Safari and OS X, too. A corrupt cookie, a plug-in, or cached data may be the cause of the problem, although it's rarely offered up as a solution by web developers or support staff.

Corrupt cookies, plug-ins, or cached history can all cause problems, and we'll show you how to remove them in this article. But there's an additional problem that can occur when the amount of stored cookies becomes excessive, even if there's nothing wrong with them, and that's a decline in Safari's overall performance.

An Excessive Number of Stored Cookies Can Drag Safari Down

Have you ever wondered just how many cookies Safari has stored? You may be surprised at the number, especially if you haven't deleted cookies in a long time. If it's been a year or more, it wouldn't be unusual to see 2,000 to 3,000 cookies. I've seen numbers above 10,000, but that was over several years, with individuals who migrated Safari data each time they upgraded to a new Mac.

Needless to say, that's way too many cookies. At those levels, Safari can bog down when it needs to search through its list of cookies in order to respond to a web site's request for stored cookie information. If the cookies in question have any issues, such as being out of date or corrupt, then everything slows down as your web browser and the website try to figure out what's going on, likely timing out before moving on.

If a website you routinely visit always seems to hesitate before the site loads, corrupt cookies may be the cause (or one of them).

How Many Cookies Are Too Many?

There's no hard and fast rule that we're aware of, so we can only give you advice based on direct experience. Cookie numbers below a couple of thousand don't seem to present any noticeable impact on Safari's performance. Move above 5,000 cookies and you may have a greater chance of experiencing performance or operability issues. Above 10,000, we wouldn't be surprised to see Safari and one or more websites exhibit performance problems.

My Personal Cookie Numbers

We use multiple browsers, one of which we reserve for personal financial use, such as banking and online purchases. This browser is automatically cleared of all cookies, history, passwords, and cached data after every use.

Safari is our general-purpose browser; we use it the most often, for exploring new websites, researching articles, checking the news and weather, tracking down rumors, or perhaps enjoying a game or two.

We clear out Safari's cookies about once a month and typically have 200 to 700 cookies stored.

We have Safari configured to allow cookies from the originating website, but block all cookies from third-party domains. For the most part, this prevents third-party ad companies from imposing their tracking cookies, although a few still make their way in through other methods. Of course, the websites I visit can impose their own tracking cookies directly, and display ads based on my browsing history on their site.

In short, keeping third-party cookies at bay is the first step in cutting down on cookie storage numbers.

How to Configure Safari to Only Accept Cookies From the Visited Web Site

  1. Launch Safari and select Preferences from the Safari menu.
  2. In the window that opens, click the Privacy tab.
  3. From the "Block cookies and other website data" option, click the "From third parties and advertisers" radio button.

You could select "Always" and be done with cookies entirely, but we're looking for the middle ground, allowing some cookies, and keeping others away.

Deleting Safari's Cookies

You can delete all of your stored cookies or just the one(s) you want to remove, leaving the others behind.

  1. Launch Safari and select Preferences from the Safari menu.
  2. In the window that opens, click the Privacy tab.
  3. Near the top of the Privacy window, you'll seeĀ "Cookies and other website data." If you wish to remove all stored cookies, click the Remove All Website Data button.
  4. You'll be asked if you really want to delete all data that has been stored by websites. Click Remove Now to remove all cookies, or click Cancel if you've changed your mind.
  5. If you would like to remove specific cookies or find out which sites have been storing cookies on your Mac, click the Details button, just below the Remove All Website Data button.
  6. A window will open, listing all of the cookies that are stored on your Mac, in alphabetical order by domain name, such as If it's a long list and you're looking for a specific site, you can use the search box to locate a cookie. This can be helpful when you're having problems with a specific website; deleting its cookie may set things right.
  7. To delete a cookie, select the website name from the list, and then click the Remove button.
  1. You can select multiple sequential cookies using the shift key. Select the first cookie, then hold down the shift key and select the second cookie. Any cookies in between the two will also be selected. Click the Remove button.
  2. You can use the command (Apple cloverleaf) key to select non-contiguous cookies. Select the first cookie, and then hold down the command key as you select each additional cookie. Click the Remove button to delete the selected cookies.

Deleting Safari's Cache

The Safari cache files are another source of potential corruption issues. Safari stores any pages you view in a cache, which allows it to reload from local files whenever you return to a cached page. This is much faster than always downloading a page from the web. However, the Safari cache files, much like the cookies, can become corrupt and cause Safari's performance to degrade.