Why you might want to clear your cookies and cache

Cookies are small files that websites store on your device to remember things about you — your login information, items in your shopping cart, your preferences. Cache is a folder of images, scripts, and other page elements that Safari saves so websites load faster the next time you visit. Both are useful, but both also mean Safari is holding onto data about where you've been and what you've done.

You might clear them if you're using a shared computer and don't want the next person to see your browsing history or logged-in accounts. You might do it if a website isn't loading correctly and you suspect stale cached files are the problem. You might do it straightforward because you prefer not to have that data sitting on your device. None of these reasons require you to clear everything — Safari lets you delete just cookies, just cache, or both, and you can choose how far back to go.

Key Takeaways

  • Cookies and cache are stored separately in Safari, and you can delete one without deleting the other.
  • The fastest way to clear both is through Settings > Safari > Clear History and Website Data, where you choose a time range.
  • Clearing cache and cookies will log you out of most websites, so have your passwords ready if you need to log back in.
  • If you want Safari to clear cookies and cache automatically when you close the app, you can turn that on in Settings.

How to clear cookies and cache through Settings

Open Settings on your iPhone or iPad, then scroll down and tap Safari. Near the bottom of the Safari settings page, you'll see "Clear History and Website Data". Tap it, and Safari will show you a time range menu with options: the last hour, today, today and yesterday, the last week, the last month, or all time. Choose the range you want, then tap "Clear History and Website Data" again to confirm.

This single action clears both your browsing history, cookies, and cached website data all at once. If you only want to clear cookies without touching your browsing history, Settings doesn't give you that option — you'll need to use the method in the next section instead.

How to clear only cookies without clearing history

If you want to keep your browsing history but remove cookies, you need to go through Safari's advanced settings. Open Settings, tap Safari, then scroll down and tap "Advanced". At the bottom, tap "Website Data". You'll see a list of websites that have stored cookies and cache on your device, organized by how much space they're using.

You can swipe left on any single website and tap "Remove" to delete just that site's data, or tap "Remove All Website Data" at the bottom to clear cookies and cache from every site while keeping your history intact. This is slower than the bulk clear if you have many sites, but it's the only way to preserve your history.

How to clear cookies and cache on Mac

On a Mac, open Safari and click "History" in the menu bar at the top of the screen. Click "Clear History" and a small window will appear asking how far back you want to go — the last hour, today, today and yesterday, the last week, the last month, or all time. Choose your range and click "Clear History".

This clears history, cookies, and cache together. If you want to remove only cookies without touching history, click Safari in the menu bar, then Preferences, then Privacy. Click "Manage Website Data" and you'll see the same list of sites as on iPhone — you can remove individual sites or click "Remove All" to clear everything while keeping your history.

What happens after you clear cookies and cache

You'll be logged out of most websites. The next time you visit a site where you were logged in, you'll need to enter your username and password again. Websites will also load slightly slower the first time you visit them after clearing cache, because Safari has to read those images and scripts again instead of pulling them from the stored copy.

Your bookmarks and saved passwords are not affected by clearing cookies and cache — those are stored separately. If you want to keep your passwords but clear everything else, clearing cookies and cache won't touch them.

How to make Safari clear cookies and cache automatically

If you want Safari to clean up after itself every time you close the app, you can turn on automatic clearing. On iPhone or iPad, open Settings, tap Safari, then toggle on "Close Tabs" and scroll down to find "Remove History and Website Data". Toggle that on, and Safari will delete your history, cookies, and cache every time you fully close the app (not just switch to another app).

On Mac, open Safari, click Safari in the menu bar, then Preferences, then Privacy. Check the box next to "Remove history items" and choose "after one day" or "manually" from the dropdown. This won't clear cookies and cache as aggressively as the iPhone setting, but it will keep your data from piling up indefinitely.

The difference between clearing cookies and clearing cache

Cookies are text files that store information about you — your login session, items you've added to a cart, your language preference. Clearing cookies logs you out and resets those preferences. Cache is a folder of images, videos, and code that websites send to your device so they load faster next time. Clearing cache makes websites load slower on your first visit after clearing, but it doesn't log you out or change any settings.

In practice, Safari doesn't let you choose between them easily — the main clear function removes both at once. If you need to clear one without the other, the Website Data method (Settings > Safari > Advanced > Website Data on iPhone, or Safari > Preferences > Privacy > Manage Website Data on Mac) is your only option.

Frequently Asked Questions

Will clearing cookies and cache delete my saved passwords?

No. Passwords are stored in a separate system called Keychain. Clearing cookies and cache won't touch them. If you want to delete a saved password, you have to do that separately through Settings > Passwords or Safari > Preferences > Passwords.

What if a website still isn't working after I clear the cache?

Try closing Safari completely and opening it again. If that doesn't help, try the same website in a different browser like Chrome or Firefox to see if the problem is specific to Safari. If it works in another browser, the issue may be with Safari's cache or cookies for that particular site, and you can try removing just that site's data through Website Data instead of clearing everything.

Can I clear cookies from just one website instead of all of them?

Yes. On iPhone or iPad, go to Settings > Safari > Advanced > Website Data, find the site you want to clear, swipe left, and tap Remove. On Mac, go to Safari > Preferences > Privacy > Manage Website Data, find the site, click it, and click Remove.

Does clearing cache free up storage space on my device?

Yes, but usually not much. Cache typically takes up between 50 megabytes and a few hundred megabytes depending on how much you browse. If you're running low on storage, clearing cache can help, but deleting unused apps or old photos will usually free up much more space.

What's the difference between clearing history and clearing cookies?

History is a list of websites you've visited. Cookies are data those websites stored on your device. Clearing history removes the list but leaves the cookies, so websites can still recognize you. Clearing cookies removes the stored data but doesn't erase the fact that you visited those sites from your history list.