Hero Background

Next-Gen App & Browser Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How to remove cookies from your computer?

To remove cookies from your computer, open your browser and press Ctrl + Shift + Delete (Cmd + Shift + Delete on Mac) to open the clear browsing data window. Select Cookies and other site data, choose a time range such as All time, and confirm. The same result is available manually through each browser's Privacy or Settings menu in Chrome, Firefox, Safari, and Edge.

Clearing cookies protects your privacy, frees space, and resolves login or layout glitches caused by stale site data. For testers, removing cookies is also a routine step in browser automation to guarantee that each test run starts from a clean, predictable session.

What Are Cookies and Why Remove Them?

Cookies are small text files that websites store in your browser to remember information such as login sessions, shopping carts, language settings, and tracking identifiers. First-party cookies come from the site you are visiting, while third-party cookies are set by external domains, often for advertising and analytics.

Removing cookies is worthwhile when you want to protect your privacy, stop cross-site tracking, sign out of shared devices, or fix websites that behave incorrectly because of outdated or corrupted stored data. If you would rather stop cookies before they are saved, see the TestMu AI guide on how to disable cookies on a browser.

How to Delete Cookies in Google Chrome

Chrome is the most widely used desktop browser, so this is the method most people need. You can remove cookies in a few clicks:

  • Click the three-dot menu in the top-right corner and choose Settings.
  • Open Privacy and security, then select Delete browsing data.
  • Switch to the Advanced tab for more control, or stay on Basic.
  • Tick Cookies and other site data.
  • Choose a time range such as All time.
  • Click Delete data to confirm.

Shortcut: press Ctrl + Shift + Delete to jump straight to the delete browsing data dialog. For deeper cache issues, TestMu AI also covers how to clear browser cache in Chrome.

How to Delete Cookies in Firefox, Safari, and Edge

Mozilla Firefox:

  • Click the hamburger menu (three lines) and open Settings.
  • Select Privacy & Security in the left panel.
  • Under Cookies and Site Data, click Manage Data to remove specific sites, or Clear Data to remove everything.
  • Confirm your choice.

Safari (macOS):

  • Open Safari and choose Settings (or Preferences).
  • Go to the Privacy tab and click Manage Website Data.
  • Select individual sites and click Remove, or click Remove All.
  • Confirm with Remove Now.

Microsoft Edge:

  • Click the three-dot Settings and more menu and open Settings.
  • Select Privacy, search, and services.
  • Under Clear browsing data, click Choose what to clear.
  • Tick Cookies and other site data, pick a time range, and click Clear now.

Not sure which browser suits your workflow? Compare options in is Edge better than Chrome.

How to Delete Cookies During Automated Browser Testing

Manual clearing works for everyday browsing, but QA engineers need to clear cookies programmatically so every automated test starts fresh. In Selenium WebDriver, a single call removes all cookies for the current session:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class ClearCookies {
    public static void main(String[] args) {
        WebDriver driver = new ChromeDriver();
        driver.get("https://www.example.com");

        // Delete a single named cookie
        driver.manage().deleteCookieNamed("session_id");

        // Delete every cookie for a clean session
        driver.manage().deleteAllCookies();

        driver.quit();
    }
}

Calling deleteAllCookies() before or after a test prevents a logged-in session from leaking into the next scenario, which is a frequent cause of flaky, order-dependent tests. Learn more about the driver in the Selenium WebDriver learning hub.

Common Mistakes and Troubleshooting

  • Selecting the wrong time range: choosing Last hour leaves older cookies behind. Pick All time for a complete cleanup.
  • Confusing cookies with cache: clearing only the cache will not remove tracking cookies or log you out. Tick the cookies option explicitly.
  • Forgetting synced devices: if the browser is signed in and syncing, cookies may return. Sign out of sync or clear on each device.
  • Losing important logins: removing all cookies signs you out of every site, including two-factor sessions. Note your passwords first.
  • Automation leftovers: in Selenium, cookies persist within a session, so call deleteAllCookies() in your setup or teardown, not just once.

Conclusion

Removing cookies is a quick, safe way to protect your privacy and fix misbehaving websites. Use Ctrl + Shift + Delete for a fast cleanup, or the Privacy menu in Chrome, Firefox, Safari, or Edge for finer control. For testers, clearing cookies programmatically keeps automated runs reliable. When accuracy matters across environments, validating cookie behavior on real browsers ensures your users get a consistent experience after they clear their data.

Frequently Asked Questions

How do I remove cookies from my computer quickly?

On Windows or macOS, press Ctrl + Shift + Delete (Cmd + Shift + Delete on Mac) inside Chrome, Firefox, or Edge to open the clear browsing data dialog. Select Cookies and other site data, choose a time range such as All time, and confirm to delete them instantly.

Will deleting cookies log me out of websites?

Yes. Cookies store your login sessions and preferences, so removing them signs you out of most sites and resets saved settings like language or theme. You will need to sign in again, but this is expected and does not harm your accounts or data.

How to remove cookies from iPhone?

Open Settings, scroll to Safari, and tap Clear History and Website Data. Confirm the prompt to delete cookies, cache, and browsing history in one step. For Chrome on iPhone, open the app menu, go to Settings, Privacy, then Clear Browsing Data.

How to remove cookies from Android?

In Chrome for Android, tap the three-dot menu, go to Settings, then Privacy and security, and choose Clear browsing data. Select Cookies and site data, pick a time range, and tap Clear data to remove them from the device.

What is the difference between clearing cookies and clearing cache?

Cookies store site-specific data such as logins and preferences, while the cache stores copies of images, scripts, and pages to speed up loading. Clearing cookies signs you out, whereas clearing cache frees space and forces fresh downloads without affecting logins.

How do testers delete cookies during automated tests?

In Selenium WebDriver, testers call driver.manage().deleteAllCookies() to clear the session, ensuring each test starts from a clean state. This prevents stale sessions from causing flaky results across browsers and is a common step in cross-browser automation.

Related Questions

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests