Manage Single-Domain Storage and Cookies in Safari
This article provides a step-by-step guide on how to inspect and manually delete specific web storage data—including Cookies, LocalStorage, SessionStorage, and IndexedDB databases—for a single domain in the Safari web browser. By utilizing Safari’s built-in Web Inspector and privacy settings, you can easily view and manage site-specific data without clearing your entire browsing history.
Prerequisite: Enable the Web Inspector
Before you can inspect storage data, you must enable Safari's developer tools.
- Open Safari and click Safari in the top menu bar.
- Select Settings (or Preferences on older macOS versions).
- Click the Advanced tab.
- At the bottom of the window, check the box next to Show features for web developers (or Show Develop menu in menu bar).
- Close the Settings window.
Accessing the Storage Tab
To inspect data for a specific website, you must first navigate to that domain.
- Go to the website you want to inspect.
- Right-click anywhere on the page and select Inspect
Element, or press
Command + Option + Ion your keyboard. - In the Web Inspector panel that opens, click on the
Storage tab at the top. If you do not see it, click the
>>icon to reveal more tabs.
Once inside the Storage tab, you will see a sidebar on the left categorizing different types of site data.
1. Inspecting and Deleting Cookies
- In the left sidebar of the Storage tab, expand the Cookies folder.
- Click on the specific domain you are inspecting.
- The main panel will display a table of all cookies for that domain, including their Name, Value, Domain, Path, and Expiration date.
- To delete a specific cookie: Click on the cookie
row to highlight it, then press the
Delete(orBackspace) key on your keyboard. Alternatively, right-click the cookie and select Delete Cookie.
2. Inspecting and Deleting LocalStorage and SessionStorage
- In the left sidebar, locate the Local Storage or Session Storage section and click the arrow to expand it.
- Select the domain name underneath the respective category.
- The main window will display a list of Key and Value pairs currently stored by that domain.
- To edit a value: Double-click either the Key or the Value field to modify it directly.
- To delete an item: Click on a Key-Value row to
select it, then press the
Deletekey on your keyboard, or click the trash can icon at the top right of the Storage panel to clear all entries for that storage type.
3. Inspecting and Deleting IndexedDB Databases
- In the left sidebar, expand the Indexed Databases section.
- Click the arrow next to the domain name to see the databases associated with it, then expand the database to view its Object Stores.
- Click on an Object Store to inspect the keys and values stored inside it.
- To delete specific entries: Select an entry in the
table and press the
Deletekey, or click the trash can icon at the top of the panel to clear the entire Object Store. - To delete the entire database: Safari's Storage UI
does not always allow you to delete the root database folder directly.
To completely drop a specific IndexedDB database, switch to the
Console tab in the Web Inspector, type
indexedDB.deleteDatabase('database_name')(replacingdatabase_namewith the actual name of the database), and pressEnter.
Deleting All Data for a Single Domain at Once
If you do not need to inspect the data and simply want to wipe all Cookies, LocalStorage, and IndexedDB databases for a single domain simultaneously, use Safari's Privacy settings.
- Click Safari in the top menu bar and select Settings.
- Go to the Privacy tab.
- Click the Manage Website Data... button.
- Use the search bar in the top right corner to type the name of the specific domain.
- Select the domain from the list and click Remove.
- Click Done to finish. This immediately purges all stored data and caches for that specific site.