What clearing cache does and why you might do it

Cache is temporary data your computer stores to load websites, programs, and files faster the next time you use them. Your browser saves images and page code. Your operating system caches recently used files. Over time, this pile of temporary files can take up gigabytes of storage space, slow down your machine, or cause a website to display an outdated version when you refresh it.

Clearing cache does not delete your passwords, bookmarks, or saved login information unless you specifically choose those options. It removes only the temporary copies. Most people clear cache once every few months, or more often if they notice their computer running slowly or if a website is not showing updates.

The steps differ between Windows and Mac, and between your web browser and your operating system. This guide covers the most common routes.

Key Takeaways

  • Browser cache (Chrome, Firefox, Safari, Edge) clears through each browser's settings menu under History or Privacy, usually in under a minute.
  • Windows temporary files live in the Temp folder and can be deleted through Settings > System > Storage > Temporary files, or manually through File Explorer.
  • Mac cache clears through System Settings > General > Storage, or by manually deleting the Library/Caches folder in Finder.
  • Clearing cache frees up storage space and can fix websites that display outdated content, but does not remove your passwords or bookmarks.
  • You can set most browsers to clear cache automatically when you close them, so you do not have to do it manually each time.

Clearing cache in Chrome, Firefox, Safari, and Edge

All major browsers store cache the same way and clear it through nearly identical steps. Open your browser, then use the keyboard shortcut Ctrl + Shift + Delete (Windows) or Command + Shift + Delete (Mac). This opens the cache-clearing menu directly.

If the shortcut does not work, open the browser menu (three dots in Chrome, Firefox, and Edge; or the menu bar in Safari), select History, then select Clear Browsing Data or Clear History. A window will appear asking what time range you want to clear — choose "All time" if you want to remove everything, or pick a specific range like "Last 7 days" or "Last 24 hours".

Make sure the box next to "Cached images and files" is checked. You can leave "Cookies and site data" unchecked if you want to stay logged into websites, or check it if you want to clear those too. Click the Clear button. The process takes seconds to a few minutes depending on how much cache has built up.

Clearing temporary files on Windows

Windows stores temporary files in a hidden Temp folder. The easiest route is through Settings. Open Settings, go to System, then Storage. Scroll down and click "Temporary files". Windows will show you how much space temporary files are using. Check the boxes next to the file types you want to remove — usually "Temporary files", "Recycle Bin", and "Temporary internet files" are safe to delete. Click Remove files.

If you prefer to delete files manually, open File Explorer and type %temp% in the address bar at the top, then press Enter. This takes you directly to the Temp folder. Select all files (Ctrl + A), then press Delete. Windows may tell you some files are in use and cannot be deleted — that is normal. Delete what you can and move on.

You can also clear the Prefetch folder, which stores data about programs you run. Open File Explorer, navigate to C:\Windows\Prefetch, select all files, and delete them. This folder rebuilds itself automatically as you use your programs.

Clearing cache on Mac

Mac stores cache in a hidden Library folder. The simplest method is through System Settings. Open System Settings, click General, then click Storage. Mac will show you what is taking up space. Click the three dots next to "Cache Files" or look for an option to clear cache — the exact wording varies by macOS version. Follow the prompts to remove cache.

If you want to delete cache manually, open Finder, press Command + Shift + G to open the "Go to Folder" dialog, then type ~/Library/Caches and press Enter. This opens the Caches folder. You can delete individual process caches or select all and delete them. Deleting cache will not harm your Mac — applications will rebuild their cache the next time you use them.

You can also clear DNS cache, which stores website addresses your Mac has recently looked up. Open Terminal (search for it in Spotlight), then type sudo dscacheutil -flushcache and press Enter. You may be asked for your password. This clears the DNS cache without affecting anything else.

Setting your browser to clear cache automatically

Most browsers let you clear cache every time you close them, so you do not have to do it manually. In Chrome, open Settings, click Privacy and security, then click Clear browsing data. Check the box that says "Clear cookies and other site data when you quit Chrome". In Firefox, go to Settings, click Privacy & Security, scroll to Cookies and Site Data, and check "Delete cookies and site data when Firefox is closed".

In Safari, open Preferences, click Privacy, then check "Remove all website data when quitting Safari". In Edge, open Settings, click Privacy, search, and services, then toggle on "Clear browsing data" and choose what to clear. Once you turn this on, your browser will automatically delete the selected cache every time you close it.

When cache clearing fixes common problems

If a website is showing you an old version of a page even after you refresh, clearing browser cache usually fixes it. If your computer is running slowly and you have not cleared cache in months, removing temporary files can free up several gigabytes. If a website is not loading correctly — buttons are missing, images are broken, or the layout looks wrong — clearing cache and cookies for that specific site often solves it.

To clear cache for just one website in Chrome or Firefox, right-click anywhere on the page, select Inspect or Inspect Element, click the process or Storage tab, then find Cookies or Cache Storage on the left side. Select the website and delete it. This removes only that site's data without touching anything else.

Frequently Asked Questions

Will clearing cache delete my passwords and saved logins?

Only if you check the box for "Cookies and site data" when clearing. If you uncheck that box and clear only cached images and files, your passwords stay. Most people leave cookies checked so they have to log in again, which is more find.

How often should I clear cache?

Once every few months is typical for most people. If your computer is running slowly or you notice websites displaying outdated content, clear it sooner. If you set your browser to clear cache automatically when you close it, you do not need to do it manually at all.

Can I clear cache without losing my bookmarks?

Yes. Bookmarks are stored separately from cache. When you clear cache, uncheck any box that mentions bookmarks or saved pages. Your bookmarks will remain untouched.

What is the difference between cache and cookies?

Cache stores images, code, and files to make websites load faster. Cookies store information about you — login status, preferences, what you put in your cart. Clearing cache speeds up your computer; clearing cookies logs you out of websites and resets your preferences.

Is it safe to delete everything in the Temp folder on Windows?

Mostly yes. Windows will not let you delete files that are currently in use. Some programs may run slightly slower the first time you use them after clearing Temp, because they have to rebuild their temporary files. This is temporary and harmless.