What cache and cookies are, and why you might want to clear them
Cache is a folder on your device where Safari stores copies of web pages, images, and files you've visited. Cookies are small text files that websites save to remember you — your login information, what you put in a shopping cart, your preferences. Both speed up browsing, but they also take up storage space and can track your activity across sites.
Clearing them won't break anything. Websites will load slightly slower the first time you visit them after clearing, because Safari has to download fresh copies instead of using stored ones. You'll be logged out of most sites and will need to sign back in. But your passwords (stored separately in Safari's password manager) stay intact unless you specifically delete those too.
People clear cache and cookies for three main reasons: to free up storage space on a full device, to remove tracking data before browsing sensitive topics, or to fix a website that's behaving oddly because it's using stale cached information.
Key Takeaways
- On iPhone and iPad, go to Settings > Safari > Clear History and Website Data and choose the time range you want to clear.
- On Mac, open Safari, go to History menu > Clear History, choose the time range, and make sure "all history" is selected in the dropdown.
- Clearing cache and cookies logs you out of websites but does not delete your saved passwords unless you specifically choose that option.
- You can set Safari to clear cache and cookies automatically every time you close the browser by turning on "Remove all website data" in Settings.
Clearing cache and cookies on iPhone and iPad
Open the Settings app on your home screen. Scroll down and tap Safari — it's usually near the bottom of the list. Scroll down again until you see "Clear History and Website Data" and tap it.
A popup will appear asking what time range you want to clear. Your options are "the last hour", "today", "today and yesterday", or "all time". Choose whichever matches what you want to remove. Tap "Clear History and Website Data" to confirm. The process takes a few seconds.
If you want Safari to do this automatically every time you close the browser, stay in the Safari settings and scroll down to find "Remove all website data". Toggle it on. From then on, your cache and cookies will clear whenever you fully close Safari (swiping it away from the app switcher counts as closing it).
Clearing cache and cookies on Mac
Open Safari and look at the menu bar at the top of your screen. Click "History" — it's between "Bookmarks" and "Develop". A dropdown menu will appear. At the bottom, click "Clear History".
A dialog box will open. In the dropdown at the top that says "the last hour", click it and choose your time range: "the last hour", "today", "today and yesterday", or "all history". Make sure the checkbox next to "all history" is checked — if it's not, Safari will only clear your browsing history, not your cache and cookies. Click "Clear History".
To set this to happen automatically, go to Safari menu > Settings (or Preferences on older Macs), click the "Privacy" tab, and check the box next to "Remove all website data when quitting Safari". Close the window. Now Safari will clear everything when you quit the app.
What gets cleared and what stays
When you clear cache and cookies, Safari removes stored web pages, images, cookies, and browsing history from the time range you selected. It does not delete your saved passwords, credit card information, or autofill data — those are stored separately in your iCloud Keychain and stay put.
If you want to delete passwords too, you have to do that separately. On iPhone or iPad, go to Settings > Passwords (or Passwords and Autofill), find the password you want to remove, swipe left on it, and tap Delete. On Mac, open Safari > Settings > Passwords, find the entry, click it, and click the minus button at the bottom.
Clearing cache and cookies for a specific website only
If one website is acting broken or slow, you can clear just that site's data without clearing everything. On iPhone or iPad, go to Settings > Safari > Advanced > Website Data, find the site in the list, swipe left on it, and tap "Remove". On Mac, go to Safari > Settings > Privacy, click "Manage Website Data", find the site, click it, and click "Remove".
This is faster than clearing all your cache if you only need to fix one site, and you stay logged into everywhere else.
When clearing cache and cookies actually solves a problem
A website showing you old information, refusing to load properly, or displaying a broken layout is sometimes fixed by clearing that site's cache. The website's server sent you a file weeks ago, Safari cached it, and now the site is trying to use the old version instead of downloading the new one.
Clearing cache also helps if a website is behaving strangely after you changed your account settings — the old cached version of the page might be overriding the new settings. Try clearing just that site's data first before clearing everything.
Clearing cookies does not usually fix technical problems; it's mainly for privacy or storage space. But if a site is stuck thinking you're logged in as someone else, clearing its cookies can reset that.
Frequently Asked Questions
Will clearing cache and cookies delete my passwords?
No. Passwords are stored in your iCloud Keychain, which is separate from cache and cookies. Clearing cache and cookies will log you out of websites, but your saved passwords remain. You'll need to sign back in, and Safari will offer to save your password again if you want.
How often should I clear my cache and cookies?
There's no set schedule. Clear them when your device is running low on storage, when you want to remove tracking data, or when a website isn't working right. If you browse sensitive topics regularly and want privacy, turning on automatic clearing when you close Safari is simpler than doing it manually.
What's the difference between clearing history and clearing cache?
Clearing history removes the list of websites you visited from Safari's History menu. Clearing cache removes the stored files and images from those sites. Clearing cookies removes the tracking and login data. The "Clear History and Website Data" option clears all three at once.
If I clear cookies, will I lose my shopping cart?
Yes. Shopping carts are usually stored in cookies, so clearing cookies empties them. If you're about to clear your cache and cookies, finish your shopping first or save items to a wishlist instead.
Can I clear cache and cookies without clearing my browsing history?
Not with Safari's built-in tools — the clear function removes all three together. If you only want to keep your history private but clear cache and cookies, your best option is to turn on Private Browsing mode going forward, which prevents Safari from storing any of these things while you're in that mode.