What cookies are and why you might want to clear them

Cookies are small files that websites store on your computer to remember information about you. When you visit a website, it can place a cookie on your machine that tracks what you looked at, what you bought, or that you were logged in. The next time you visit, the website reads that cookie and knows who you are.

Most cookies are harmless and make websites work better — they let you stay logged into email, keep items in your shopping cart, or remember your preferences. But some cookies track you across many websites to build a profile of your browsing habits, and some people find that uncomfortable. Clearing cookies removes all of them from your computer, which means websites will no longer remember you the next time you visit.

You might clear cookies if you share your computer with others and want to erase your browsing history, if you want to log out of all websites at once, or straightforward to free up a small amount of storage space. The process is different depending on which web browser you use.

Key Takeaways

  • Cookies are small files websites store on your computer to remember information about you, and clearing them removes that stored data.
  • In Chrome, Firefox, Safari, and Edge, you can clear cookies through the browser settings under "Clear browsing data" or "Privacy".
  • You can choose to clear cookies from all time or just from the last hour, day, or week depending on your browser.
  • After clearing cookies, you will need to log back into websites and may notice some sites load slightly differently until they set new cookies.
  • Clearing cookies does not delete your browsing history, passwords, or other saved data unless you specifically select those options too.

How to clear cookies in Google Chrome

Open Chrome and click the three vertical dots in the top right corner of the window. From the menu that appears, select Settings. On the left side, click Privacy and security, then click Clear browsing data.

A window will pop up with options. At the top, you will see a dropdown menu that says "All time" — this controls how far back the clearing goes. Leave it on "All time" to remove all cookies, or select a shorter period like "Last hour" or "Last 7 days" if you only want to clear recent ones. Make sure the box next to Cookies and other site data is checked, then click the blue Clear data button.

How to clear cookies in Mozilla Firefox

Open Firefox and click the three horizontal lines (called a hamburger menu) in the top right corner. Select Settings, then click Privacy & Security on the left side. Under the section labeled "Cookies and Site Data," click the button that says Clear Data.

A small window will appear. Make sure the box next to Cookies and Site Data is checked. You can also see a dropdown at the top that lets you choose the time range — select "Everything" to clear all cookies, or pick a shorter period. Click Clear to finish.

How to clear cookies in Safari

Open Safari and click Safari in the menu bar at the very top of your screen (not inside the browser window). From the dropdown menu, select Settings or Preferences depending on your macOS version. Click the Privacy tab.

You will see a button labeled Manage Website Data. Click it to see a list of all websites that have stored cookies on your computer. To remove all of them at once, click Remove All. If you want to remove only specific websites, select them from the list and click Remove. Then close the window.

How to clear cookies in Microsoft Edge

Open Edge and click the three dots in the top right corner. Select Settings, then click Privacy, search, and services on the left side. Under "Clear browsing data," click the button that says Choose what to clear.

A window will open with a time range dropdown at the top — select "All time" to clear all cookies or pick a shorter period. Make sure Cookies and other site data is checked, then click Clear now. You can also turn on the toggle for "Clear browsing data every time you close the browser" if you want Edge to automatically remove cookies whenever you shut down the process.

What happens after you clear cookies

Once you clear cookies, websites will no longer remember you. The next time you visit a site you were logged into, you will need to enter your username and password again. Sites that remember your preferences — like a news website that shows you articles in a certain category — will reset to their default view.

Some websites may also load slightly differently or more slowly the first time you visit after clearing cookies, because they need to set up new cookies to track your session. This is normal and temporary. Your passwords, bookmarks, and browsing history are not affected by clearing cookies unless you specifically selected those options in the clearing dialog.

The difference between clearing cookies and clearing browsing history

Clearing cookies and clearing browsing history are two separate things, though the dialog boxes for both appear in the same place. Browsing history is the list of websites you have visited — clearing it removes that list so others cannot see where you have been online. Cookies are the files websites store on your computer to remember information about you.

You can clear one without clearing the other. If you want to remove both, make sure both boxes are checked in the clearing dialog. If you only want to clear cookies and keep your browsing history, uncheck the "Browsing history" box and leave only "Cookies and site data" checked.

Frequently Asked Questions

Will clearing cookies delete my saved passwords?

No. Passwords are stored separately from cookies. When you clear cookies, your saved passwords remain on your computer unless you specifically check a box labeled "Passwords" or "Saved passwords" in the clearing dialog. You have to choose to delete them.

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

Yes, in most browsers. In Chrome, go to Settings > Privacy and security > Cookies and other site data, then find the website in the list and click the trash icon next to it. In Firefox, go to Privacy & Security > Cookies and Site Data > Manage Data, find the site, and click Remove. Safari and Edge have similar options in their website data managers.

What if I clear cookies and then want to undo it?

Once cookies are cleared, they cannot be recovered. However, websites will create new cookies the next time you visit them. If you were logged into an account, you will need to log back in, and the website will set up a new cookie to remember you.

Do I need to clear cookies regularly?

No, clearing cookies is optional. Most people do not need to clear them regularly. You might clear them if you share your computer, if you want to log out of all sites at once, or if you are concerned about tracking. Otherwise, leaving them alone will not harm your computer.