Clearing Cache and Cookies: What It Fixes and What It Erases
Learn the difference between cache, cookies and site data, what clearing each one fixes, what you lose and how to clear just one website.
Key takeaways
- The cache holds copies of page files, while cookies and site storage hold sign-ins, preferences and other state.
- A hard reload or private window is a quick, harmless test before you delete anything.
- Clearing data for one website solves most single-site problems without disturbing the rest.
- Clearing cookies or site data signs you out and can erase unsynced work stored only in the browser.
Clearing the cache forces your browser to download fresh copies of a site's files, which fixes stale or broken-looking pages and signs you out of nothing. Clearing cookies and site data resets what websites remember about you, which fixes many sign-in loops and settings glitches, and signs you out.
The two are usually offered side by side in one dialog, so people erase far more than they need. Start with the smallest action that could work, and widen it only if the problem remains.
What your browser stores
Cache is a set of saved copies of images, stylesheets, scripts and pages, kept so they don't have to download again. Servers send rules saying how long each copy stays fresh, explained in browser caching and cache-control headers.
Cookies are small pieces of text a site asks your browser to keep and send back with later requests. They commonly hold a session identifier that proves you signed in. See how cookies work in HTTP.
Site storage includes local storage, IndexedDB databases, cache storage used by service workers and the workers themselves. Web apps keep settings, offline content and drafts there.
History, saved passwords and autofill entries are separate categories. Clearing cache doesn't touch them, though the same dialog can delete them if you tick their boxes.
Why stale data causes trouble
A modern page is many files that expect to match each other. Suppose a site releases new code that expects a new data format. If your browser still holds yesterday's script and today's page, the two disagree and a button silently fails. Fetching fresh copies puts them back in step.
Cookies go wrong in a different way. A session may expire on the server while the cookie remains in your browser, and a badly written sign-in flow can then loop: the site sees a cookie, rejects it, sends you to sign in and meets the same cookie again. Deleting it lets the process start clean. Sites that set many large cookies can also push request headers past what a server accepts.
Service workers add a third case. A web app's background script may keep serving saved files after the site has changed. A normal reload doesn't always replace it, while clearing that site's data removes both the worker and its saved copies. You can see how cookie settings such as expiry and scope behave with a Set-Cookie attribute explainer.
Problems clearing can fix
Clearing the cache is a good bet when a site looks half styled after an update, a button runs old behavior, an image you replaced still shows the old version or a page works on another device but not this one.
Clearing cookies and site data helps when you bounce between sign-in pages, a site insists you're signed in as the wrong account, a shopping cart is stuck, an error says request headers or cookies are too large or a web app fails to start after an update.
Problems it won't fix
Clearing data won't repair a server outage, a broken Wi-Fi connection, a DNS failure or a bug in the current version of a site. It doesn't remove malware or an unwanted extension. It doesn't erase what websites already hold about you on their servers, and it doesn't hide past activity from your network operator or employer.
If a page fails in every browser on every device, the trouble is probably elsewhere. For connection problems, try a structured troubleshooting method, and for stale name lookups, flush the DNS cache.
Try the gentle options first
- Reload. Press
F5or the reload button. - Hard reload. On Windows and Linux,
Ctrl+F5orCtrl+Shift+Rin most browsers. On a Mac,Cmd+Shift+Rin Chrome and Firefox. This refetches the current page's files while leaving cookies alone. - Private window. It starts without your existing cookies and cache. If the site works there, stored data or an extension is a likely cause.
- Clear one site. Remove only that site's data.
Clear data for a single website
In most desktop browsers, click the icon to the left of the address, often a lock, sliders or shield, and look for cookies or site data. You can also open the privacy section of settings, find the list of stored site data and search for the domain.
Remember related domains. A service may sign you in through a separate address, so if clearing the main site doesn't help, look for its sign-in domain too. In Safari, use the website data manager in privacy settings.
Clear browser-wide
Press Ctrl+Shift+Delete on Windows and Linux, or Cmd+Shift+Delete on a Mac, to open the clearing dialog in Chrome, Edge and Firefox. Safari offers a clear history command and a website data manager; its menu command for emptying caches lives in the developer menu, which you enable in advanced settings.
Choose two things carefully:
- Time range. The last hour or day may be enough. "All time" removes everything.
- Categories. Tick cached images and files alone for display problems. Add cookies and site data only if needed. Leave passwords and autofill unticked unless you truly mean to delete them.
On phones, the same options live under the browser's privacy or history settings. On iPhone and iPad, Safari's controls are in the system Settings app. Some phone operating systems also offer "clear storage" for a browser app, which is far more drastic than clearing browsing data and can reset the whole app.
Set automatic rules instead
Most browsers can handle recurring cleanup for you. Look in privacy settings for an option to delete cookies and site data when you close the browser, with a list of sites allowed to keep theirs. Add your email, password manager and work tools to that list so you aren't signing in all day.
Some browsers also clear storage automatically for sites flagged as trackers, or limit how long certain script-set data lasts. These differ widely by browser and version. If a site keeps forgetting you although you clear nothing, check for such a setting, an extension that deletes cookies or a private window you didn't realize you were in.
What you lose
| You clear | You may lose |
|---|---|
| Cache | Nothing permanent; some pages load slower once |
| Cookies | Sign-ins, "remember this device" flags, carts |
| Site storage | Offline files, drafts, game saves, web app settings |
| History | Visited pages and some suggestions |
| Passwords | Saved logins, possibly on synced devices too |
| Autofill | Saved addresses and cards |
Sites may also treat you as a new device and ask for a second factor. Before clearing everything, make sure you can get into your accounts: your password manager is available, your authenticator works and you have recovery codes. If a web tool keeps your documents only in the browser, export them first.
A worked example
Imagine your bank's page suddenly shows a spinning circle after you sign in, while everything else works. A hard reload changes nothing. In a private window the bank loads normally, which tells you the site is up and your connection is fine.
You remove data for the bank's domain only, sign in again and approve the new device prompt. The spinner is gone. Your shopping cart elsewhere, your webmail session and your saved drafts are untouched. Had the private window also failed, you would have known not to bother deleting anything, and could have checked the bank's status page or tried another network instead.
Mind the sync setting
If browser sync is on, deleting history or passwords on one device can delete them on others. Cookies and cache generally stay local, but behavior depends on the browser. Read the dialog's notes, and see what sync uploads before deleting anything you can't recreate.
Should you clear on a schedule?
Routine cache clearing for speed does the opposite: the browser has to download everything again. Browsers manage cache size on their own. If space is tight, clearing helps once.
Routine cookie clearing is a privacy choice with a cost. It limits some long-term tracking and means signing in repeatedly. Often better options exist: block third-party cookies, set the browser to delete data on close with exceptions for sites you trust or use separate profiles. Clearing cookies doesn't stop fingerprinting or tracking tied to an account you sign back into.
On a shared or public computer, the advice flips. Use a private or guest window, sign out explicitly and close it.
If clearing didn't help
Test with extensions disabled, then in a new profile, then in another browser. Check the system clock, since a wrong date breaks secure connections. Follow the one-browser checklist if only one program fails, or consider a careful reset.
For site owners
If you find yourself telling visitors to clear their cache after each release, fix the cause. Give static files a new name or version string when their contents change, let HTML pages revalidate and make sure any service worker updates cleanly. You can experiment with header combinations in an HTTP cache simulator. Making updates appear reliably covers CDN layers as well.
Common questions
Does clearing cookies log me out on my phone too?
Normally no. Cookies are stored per browser on each device. Signing out of all sessions from an account's security page is a different action that affects every device.
Does a private window clear my existing cookies?
No. It uses a separate temporary store, which is discarded when the last private window closes. Your normal data is unaffected.