While many privacy-conscious users prefer to clear their cookies after every browsing session, an indiscriminate “clear all” approach will forcefully log you out of your favorite accounts and wipe your saved preferences across the entire web. If you want to maintain your login status on trusted sites (like your email or banking portal) but automatically wipe tracking cookies from social media or advertising networks, you can configure Google Chrome to delete cookies for specific websites the moment you close the browser.
How to Clear Cookies on Exit
Google Chrome includes a built-in feature that allows you to build a custom blacklist of websites. Any cookies generated by the sites on this list will be securely deleted when the Chrome application terminates.
- Open the Google Chrome browser on your computer.
- Click the three-dot menu icon located in the top right corner.
- Select Settings from the dropdown menu.
- In the left-hand sidebar, click on Privacy and security.
- In the main window, click on Site Settings.
- Scroll down to the Content section and click on Third-party cookies.
- Scroll down until you see the section labelled Always clear cookies when windows are closed.
- Click the Add button next to that header.
How to Format the Website URLs
When the dialog box appears, you must type the URL of the website you wish to target. However, to ensure Chrome catches all tracking domains associated with that site, you should use a wildcard prefix.
For example, instead of just typing facebook.com, you should type: [*.]facebook.com
The [*.] prefix instructs Chrome to automatically delete cookies from the main domain as well as any subdomains (like login.facebook.com or analytics.facebook.com). After typing the URL, check the box labelled Including third-party cookies on this site, and click Add.
You can repeat this process for as many websites as you like. From now on, whenever you click the “X” to close the Chrome browser entirely, the browser will silently execute a localized cleanup operation, purging the targeted tracking data while leaving your trusted, whitelisted sessions perfectly intact.