We may receive compensation for its content through paid collaborations. See how we sustain our work & review products.
When Safari Database Cookies Keep Coming Back

When Safari Database Cookies Keep Coming Back

Last updated: January 14, 2025 (2)
Contents
Table of contents

MacOS Privacy

Have you ever wondered why Safari retains data from websites even if you instruct it to remove all website data? If yes, you are not alone with your question. If you have ever removed cookies manually from your preferred web browsers, you must have noticed that sometimes it may take a few “Remove All” clicks for the cookies to disappear from your Mac, and yet still some ‘stubborn’ database files remain. In this article we will show you how to erase those stubborn files that keep coming back.

Clearing cookies with Mac optimization apps

Privacy-conscious Mac users regularly clean their web browsers of cookies using third party Mac optimization software such as CleanMyMac or OnyX. As you may already know, websites often store cookies and other data locally on your own machine that contains information you have at some point provided: name, email address, preferences, and the like. Cookies are helpful for identifying you on a return visit to those sites.

Mac optimization apps are very helpful for doing the cookie cleaning (alongside any browsing history) but they fail to wipe away all the data left behind on your computer, such as database files from websites stored on your Mac.

What are those database files?

safecart.com Databases

As Apple explains to developers looking to launch websites, there are three independent components of the HTML5 client-side storage in Safari: the offline application cache, key-value storage and JavaScript database storage. The last option reduces server load by replacing server-side programs with client-side scripts, and this enables them to even store large amounts of structured data locally using an SQL-compatible JavaScript database. This allows website developers to keep user-generated and user-consumed data on the user’s computer and transfer the processing load from the server to the user’s CPU. It also allows the developer to limit the data set accessible to SQL over the internet.

In a support document published in the spring of 2017, Apple explains:

"You can use some websites to create and edit documents that are saved on your computer – for example, a travel log about your latest vacation. When you save the document, the website uses space on your computer to store your document as a database."

How to remove database files from your computer

Interestingly, neither Firefox nor Chrome lists the database files when you search for them in Preferences and “cookies”. Apple’s strategy, on the other hand, is to inform users about the existence of such databases. These can be checked for yourself to find out if any website has stored data on your Mac by launching Safari and selecting Preferences, then the Privacy tab. Here, you’ll find all the cookies that websites have stored on your computer. Either go through them one by one or click “Remove all” to delete them. What will remain are only the websites with the “Databases” information below them.

To erase these files, follow the steps below.

discount with
CleanMyMac logo
Switch your current Mac optimizer for and the company will offer you a tasty discount.
Save on

How to remove database files

1

Launch Finder.

2

Press Command-Shift-G (or “Go to Folder” from the “Go” menu).

3

Type this command: ~/Library/Safari/Databases

Although you have now successfully removed the database files, keep in mind that this won’t stop them from coming back if you are visiting sites that use JavaScript databases. Since Mac optimization apps cannot remove them, we recommend checking back from time to time and repeating the above steps. This is how you can achieve a much cleaner Mac and protect your privacy at the same time.


Best Mac optimization software of 2025

Editor's choice
CleanMyMac logo
Editor's rating:
(4.5)
User-friendly dashboard
Effective scanning and cleaning options
Various maintenance tools
Built-in malware remover
All-around protection
MacKeeper logo
Editor's rating:
(4)
Personalized remote assistance
Unique optimization tools
Anti-theft tracking
Built-in antivirus
Beginners
MacBooster logo
Editor's rating:
(3.5)
Fast scanning
User-friendly UI
Virus and malware scan
Great cleaning features
Businesses
CCleaner for Mac logo
Editor's rating:
(4)
Fast scans and cleaning
Full customization
Extensive free version
Affordable

User feedback

    Abba Abba
    Has an article about cleaning out a Mac, features an ad for MacKeeper, CleanMyMac, and CCleaner - all adware.
    1. Best Reviews Best Reviews
      Thank you for your comment Abba.  Our Mac optimization experts have tested and reviewed these solutions and other Mac optimization software and concluded that MacKeeper, CleanMyMac and CCleaner are viable Mac cleaning solutions. We invite you to check on our reviews of these apps to learn more about our findings. Feel free to share your thoughts on those specific solutions in a user review for those solutions.
    No comments with that rating.

 Leave a reply

Your email address will not be published. Required fields are marked *


Best Reviews may receive compensation for its content through paid collaborations and/or affiliate links. Learn more about how we sustain our work and review products.

©2012-2025 Best Reviews, a clovio brand – All rights reserved
Privacy policy · Cookie policy · Terms of use · Partnerships · Contact us