Why you might want to clear 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 collection of images, scripts, and other page elements that Safari saves so websites load faster the next time you visit. Both are useful, but clearing them periodically can help if a website is behaving strangely, you want to remove your browsing history from your device, or you're concerned about the data websites have collected about you.
Safari stores these files in different places depending on whether you're using an iPhone, iPad, or Mac. The steps differ slightly for each device, but the principle is the same: you're telling Safari to delete stored data and start fresh.
Key Takeaways
- On iPhone and iPad, open Settings, scroll to Safari, tap "Clear History and Website Data", and choose a time range or select "all time" to clear everything.
- On Mac, open Safari, click Safari in the menu bar, select "Clear History", choose how far back to clear, and make sure "cookies and other website data" is checked.
- Clearing cache and cookies will log you out of most websites, so you'll need to sign back in afterward.
- If a specific website is misbehaving, you can clear data for just that site instead of clearing everything at once.
Clearing cookies and cache on iPhone and iPad
On iPhone and iPad, Safari's data is managed through the Settings app rather than within Safari itself. Open Settings, scroll down until you see Safari (it's usually near the bottom), and tap it. You'll see several options; look for "Clear History and Website Data" near the top of the Safari settings screen.
When you tap "Clear History and Website Data", a popup will appear asking you to choose a time range. Your options are "the last hour", "today", "today and yesterday", or "all time". Select "all time" if you want to clear everything Safari has stored. The popup will also show you a checkbox for "cookies and other website data" — make sure this is checked. Tap "Clear History and Data" to confirm. Safari will immediately delete the selected data.
If you only want to clear data for a specific website, you can do that too. Go back to the Safari settings screen and scroll down to find "Advanced", then tap "Website Data". You'll see a list of every website that has stored data on your device. Swipe left on any site name to delete just that site's data, or tap "Remove All Website Data" at the bottom to clear everything.
Clearing cookies and cache on Mac
On a Mac, open Safari and click "Safari" in the menu bar at the very top of your screen. A dropdown menu will appear; look for "Clear History" and click it. A dialog box will open asking you to choose a time range: "the last hour", "today", "today and yesterday", or "all time". Select the range you want and make sure the checkbox next to "cookies and other website data" is checked. Click "Clear History" to finish.
If you want more control over what gets deleted, you can use Safari's preferences instead. Click "Safari" in the menu bar, then "Settings" (or "Preferences" on older Macs). Click the "Privacy" tab. You'll see options to manage cookies and website data. Click "Manage Website Data" to see a list of every site that has stored information on your Mac. You can select individual sites and click "Remove" to delete just their data, or click "Remove All" to clear everything at once.
What happens after you clear cookies and cache
After clearing cookies and cache, you'll notice that websites load slightly slower the first time you visit them — Safari has to download all those images and scripts again instead of using the saved copies. You'll also be logged out of most websites, so you'll need to sign back in with your username and password. This is normal and expected.
Some websites may also forget your preferences. If you had customized a news site to show only certain topics, or set a search engine to a particular language, those settings may reset to the default. Again, this is because the cookie that stored your preference has been deleted.
Clearing data for a single website
If only one website is acting up — pages won't load properly, you're stuck in a login loop, or something looks broken — you don't need to clear all your cookies and cache. You can target just that site instead.
On iPhone or iPad, go to Settings > Safari > Advanced > Website Data, find the problematic site in the list, and swipe left to delete it. On Mac, go to Safari > Settings > Privacy > Manage Website Data, find the site, and click "Remove". This clears only that site's stored data while leaving everything else intact, so you won't be logged out of other websites.
When to clear cookies and cache
You don't need to clear cookies and cache on a schedule. Safari works fine with them in place, and they actually make your browsing faster and more convenient. Clear them when a website isn't working right, when you're selling or giving away your device, or when you're concerned about privacy on a shared computer.
If you use a shared device and want to prevent other people from seeing which websites you've visited, clearing your history and data is a good step — though it won't hide your activity from your internet service provider or the websites themselves. If privacy is a serious concern, consider using Safari's Private Browsing mode instead, which doesn't store history, cookies, or cache at all while you're browsing.
Frequently Asked Questions
Will clearing cookies and cache delete my saved passwords?
No. Passwords are stored separately from cookies and cache. When you clear history and website data, your saved passwords remain in Safari's password manager. You'll be logged out of websites, but Safari can usually fill in your password automatically when you try to log back in.
Can I clear cache without clearing cookies?
On iPhone and iPad, no — "Clear History and Website Data" clears both together. On Mac, the same is true with the standard "Clear History" option. However, on Mac you can use the "Manage Website Data" window to delete data for specific sites only, which gives you more control over what gets removed.
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 from Safari's History menu, but the cookies remain. Clearing cookies and cache removes the stored data but doesn't affect your browsing history list. "Clear History and Website Data" removes both.
Do I need to close Safari before clearing cookies and cache?
No. You can clear cookies and cache while Safari is open. The changes take effect immediately, though any websites you currently have open may need to be refreshed to load properly with the new (empty) cache.
Will clearing cookies log me out of iCloud and Apple services?
Clearing Safari's cookies won't affect your iCloud login or other Apple services, which use a different authentication system. You'll be logged out of websites you visit in Safari, but your Apple ID and iCloud account remain signed in on your device.