Power Your Software Testing with AI Agents and Cloud
The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.
- TestMu AI (Formerly LambdaTest)
- /
- Blog
- /
- How to Clear Cookies in Windows
How to Clear Cookies in Windows
Learn how to clear cookies in Windows across all major browsers like Chrome, Firefox, Edge, and more. Boost performance and protect privacy today.
Last Updated on:
On This Page
- Steps to Clear Cookies in Windows on Chrome
- Steps to Clear Cookies in Windows on Firefox
- Steps to Clear Cookies in Windows on Microsoft Edge
- Steps to Clear Cookies in Windows on Opera
- Steps to Clear Cookies in Windows on Brave
- Steps to Clear Cookies in Windows on Internet Explorer
- Clear Cookies in Cypress
- Clear Cookies on Test Failure
- Clear Cookies via PowerShell
Cookies and cached files quietly pile up in Windows browsers, slowing performance, showing outdated pages, and creating privacy risks, so clearing them regularly keeps browsing fast and secure. Chrome, Firefox, and Microsoft Edge each clear cookies through their own settings menus, while QA engineers can clear cookies programmatically with Cypress or PowerShell to reset automated test sessions.
How to Clear Cookies on Test Failure in Cypress
Cypress automatically clears all cookies before each test when test isolation is enabled, which prevents state from being shared across tests. That default is why a failing test rarely pollutes the next one.
The gap appears when you disable test isolation to preserve login state between tests. Then the automatic cleanup no longer runs, and a failed test can leave stale cookies behind. Reset state explicitly in a beforeEach hook so every run starts clean, even after a failure:
describe('cart tests', { testIsolation: false }, () => {
beforeEach(() => {
cy.clearAllCookies();
cy.clearAllLocalStorage();
});
// tests share a browser context but start from a known cookie state
});For long-lived login sessions, wrap the setup in cy.session() so Cypress caches and restores cookies and storage instead of re-running the login flow. Following Cypress best practices for state management keeps suites fast and deterministic.
Conclusion
Start with the method that matches your goal: press Ctrl + Shift + Delete for a quick manual clear, call cy.clearAllCookies() in a beforeEach hook to reset automated tests, or delete the Cookies database with PowerShell for a scripted reset. Regular clearing keeps browsers fast and protects your privacy, and programmatic clearing keeps automated suites reliable.
If your tests need to confirm cookie behavior across real browsers and versions, run them on TestMu AI's automation cloud and inspect the network logs it records for every session. Sign up and point your existing Cypress suite at the grid to get started.
Author
Tahneet Kanwal is a freelance technical content writer with over 2 years of hands-on experience in frontend development and technical writing. She holds a B.Tech in Information Technology from University College of Engineering and Technology (UCET). Tahneet creates clear, SEO-optimized content on web technologies, software testing, and automation tools, leveraging her skills in HTML, CSS, JavaScript, React, Tailwind CSS, and various tools like VS Code, GitHub, Figma, and Canva. She is the author of 30+ technical blogs and an open-source contributor through Hacktoberfest. She has also participated in the Google Cloud Arcade Facilitator Program and holds certifications as a Meta Android Developer (Coursera) and in Web Development (Internshala). Over time, she has evolved her writing to prioritize structure, readability, and SEO while maintaining technical depth.
Reviewer
Himanshu Sheth is the Director of Marketing (Technical Content) at TestMu AI, with over 8 years of hands-on experience in Selenium, Cypress, and other test automation frameworks. He has authored more than 130 technical blogs for TestMu AI, covering software testing, automation strategy, and CI/CD. At TestMu AI, he leads the technical content efforts across blogs, YouTube, and social media, while closely collaborating with contributors to enhance content quality and product feedback loops. He has done his graduation with a B.E. in Computer Engineering from Mumbai University. Before TestMu AI, Himanshu led engineering teams in embedded software domains at companies like Samsung Research, Motorola, and NXP Semiconductors. He is a core member of DZone and has been a speaker at several unconferences focused on technical writing and software quality.
Clearing Cookies FAQs
Did you find this page helpful?
More Related Blogs
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
























