Why you might want to clear your cookies
Cookies are small files that websites store on your computer to remember things about you — your login information, what you put in a shopping cart, your preferences. Most of the time they are useful. But they can also track which websites you visit, and some people clear them regularly for privacy reasons. You might also clear them if a website is not working right, or if you share your computer with other people and want to remove their login information.
Safari, the web browser that comes with Mac and iPhone, stores these cookies in one place. You can delete all of them at once, or delete them from specific websites. Both take less than a minute.
Key Takeaways
- On Mac, open Safari, click Safari in the menu bar, then select "Clear History" and choose how far back to delete.
- On iPhone or iPad, go to Settings, scroll to Safari, tap "Clear History and Website Data", and confirm.
- Clearing cookies will log you out of most websites, so you will need to sign back in.
- If you only want to remove cookies from one website, you can delete individual sites from Safari's website data settings instead.
Clearing all cookies on Mac Safari
Open Safari and look at the menu bar at the very top of your screen. Click the word "Safari" (not the Safari icon in your dock). A dropdown menu will appear with several options.
Look for "Clear History" and click it. A window will pop up asking "Clear history from:" with a dropdown menu that says "the last hour" or similar. Click that dropdown and choose how far back you want to delete — "the last hour", "today", "today and yesterday", or "all history". Selecting "all history" will delete all your cookies, browsing history, and cached files. Then click "Clear History" to confirm.
Safari will close the window and your cookies are gone. You will be logged out of most websites you visit next.
Clearing all cookies on iPhone or iPad Safari
On an iPhone or iPad, the process is slightly different because Safari settings live in the Settings app, not in Safari itself. Open the Settings app (the gray gear icon on your home screen).
Scroll down until you see "Safari" in the list. Tap it. You will see several options, including one that says "Clear History and Website Data" near the bottom. Tap that option. A popup will ask you to confirm — tap "Clear History and Data" again. Safari will delete your cookies, history, and cached files.
Deleting cookies from just one website
If you only want to remove cookies from a specific website instead of clearing everything, you can do that on Mac. Open Safari and click "Safari" in the menu bar again, but this time select "Settings" (or "Preferences" on older Macs). Click the "Privacy" tab.
You will see a button that says "Manage Website Data" or "Details". Click it. A list of websites will appear with the amount of data Safari has stored from each one. Find the website you want to delete, click it, and then click "Remove". That website's cookies are gone, but your other cookies remain.
On iPhone and iPad, you cannot delete cookies from individual websites through Settings. You would need to clear all cookies and website data, or use Safari's private browsing mode (called "Private" in the Safari tab switcher) to prevent cookies from being saved in the first place.
What happens after you clear cookies
The most noticeable change is that you will be logged out of websites. The next time you visit Gmail, Facebook, your bank, or any other site that required a password, you will need to sign in again. This is normal and expected.
Some websites may also load slightly slower the first time you visit them after clearing cookies, because they have to rebuild some of the information they stored. This is temporary and usually not noticeable.
If you had saved passwords in Safari, clearing cookies does not delete those passwords — they stay in your keychain. You can still use Safari's autofill to sign back in quickly.
Preventing cookies from being saved in the first place
If you want to browse without storing cookies at all, Safari has a private browsing mode. On Mac, click "File" in the menu bar and select "New Private Window". On iPhone or iPad, open Safari, tap the tab switcher icon (two overlapping squares at the bottom right), and tap "Private" at the bottom left.
In private mode, Safari does not save cookies, history, or autofill information. When you close the private window or tab, everything is deleted automatically. This is useful if you are using someone else's computer or if you want to visit a website without it remembering you were there.
Frequently Asked Questions
Will clearing cookies delete my saved passwords?
No. Cookies and passwords are stored separately. Clearing cookies will not affect the passwords Safari has saved in your keychain. You will still be able to use autofill to sign back in to websites, though you may need to enter your password once first.
Why am I still logged into websites after clearing cookies?
Some websites use tokens or other methods instead of cookies to keep you logged in. These are stored differently and may not be deleted when you clear cookies. You can also check whether you selected "all history" in the Clear History window — if you only cleared the last hour, older cookies may still be there.
Do I need to clear cookies regularly?
No, it is not necessary. Cookies do not slow down your computer or take up much space. Clear them if you want to for privacy reasons, or if a website is not working correctly. Most people do not need to clear them at all.
What is the difference between clearing cookies and clearing browsing history?
Browsing history is the list of websites you have visited. Cookies are files websites store on your computer. When you clear history, Safari deletes the list of sites you visited. When you clear cookies, Safari deletes the files those sites stored. The "Clear History" option in Safari deletes both at the same time.