Skip to content

Documentation

Kenneth T edited this page Jul 16, 2023 · 63 revisions

Settings

Automatic Cleaning Options

Enable Automatic Cleaning

Default: Disabled

  • Disabled: Extension can be used manually with the popup buttons.
  • Enabled: Automatic Cleaning happens on a combination of these triggers: tab close, domain change, browser restart.

Delay Before Automatic Cleaning

Default: 15 seconds

  • Delay before the automatic clean after tab close and/or domain change
  • Useful for those accidental tab closes
  • Minimum 1 second, Maximum 2147483 seconds, this is due to setTimeout limitations

Enable Cleanup for Discarded/Unloaded Tabs

Default: Disabled

  • Enable to clean tabs marked as 'discarded'.
  • Per Firefox and Chrome: A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated.

Enable Cleanup on Domain Change

Default: Disabled

  • Available from 2.2.0 upwards
  • Enable this to active cleanup when you move from one domain to another within the same tab.
  • Ex. Go from google.com to reddit.com in the same tab, google.com's site data are cleaned within the delay
  • Useful for people who don't use a lot of tabs
  • This could break some sites which rely on cookies from another site to login. Ex. Log in to youtube.com -> redirect to google.com -> redirect back to youtube.com
    • Some solutions are to have a higher delay or add those sites to the RestartList/GreyList.

Enable RestartList Cleanup on Browser Restart

Enable GreyList Cleanup on Browser Restart

Default: Enabled

  • Cleans cookies and other site data on browser restart, depending on your RestartList/GreyList and KeepList/WhiteList settings.
  • Disabling this will make RestartList/GreyList similar to KeepList/WhiteList.
  • Browser restart cleanup will not run if an open tab contains about:sessionrestore.

Clean Cookies from Open Tabs on StartUp

Default: Disabled

  • Delete cookies from long lasting tabs on startup
    • Note that previously opened tabs may complete loading BEFORE the extension had a chance to remove those cookies first, thus those cookies were already read by the site/tab first. You may need to refresh those page again a few seconds after startup for the site to not remember you. (Issue #559)
  • Useful for pinned tabs. Ex. Google Calendar is pinned and open but other google.com cookies will not be deleted since the Google Calendar tab is open unless this option is enabled.

Clean All Expired Cookies

Default: Disabled

  • Delete non-session cookies that have expired. These expiration timestamps are set by the website/server in order for cookies to remain after its first session. Cookies that are expired are not sent to the website/server, and existing webpages should not have access to those at all. Expired cookies, however, may still linger in the system depending on the browser.

Expression Options

Default Expression Options

  • Available as of 3.5.0.
  • To set default expression options, create an expression called _Default:[List Type], replacing [List Type] with the actual list type in CAPITAL LETTERS (i.e. WHITE (KEEP) or GREY (Restart)) e.g. _Default:WHITE or _Default:GREY
  • A button is available in List of Expressions to create default expression entries (for each existing container) for you to modify.
    • Subsequent clicks will only create new default expression options if the expression doesn't exist already for each container.
  • By default all the options are checked, which means to either keep all site data and cookies (WHITE) or keep all site data and cookies until restart (GREY)
    • If no default expression entry was found, the above will still take effect depending on list type.
    • In Firefox with containers (contextual identities) enabled, the following additional logic is first applied:
      • If a non-default container list doesn't contain any default expression entry for that list type, it will try to fetch the default expression in default/no container. (i.e. global default expression entry goes into default/no container list)
      • So: Customized default expression in non-default container > customized default expression in default container (global default) > CAD default of All Checked.

Other Browsing Data Cleanup Options

Clean Existing Data for Newly Enabled Browsing Data Types

Default: Enabled

  • Available from 3.8.0 upwards
  • If Enabled, and upon enabling any of the site data cleanups, all site data for that type will be cleared. This only happens when you enable the setting so you start with a clean slate.
  • If Disabled, enabling any of the site data cleanups will keep existing data as is. Please note that since the browsingData API doesn't allow for enumeration, you will need to visit the domains again first or hope that an existing (unwanted) cookie for that domain is available to trigger a site data cleanup (including site data from unwanted domains).
    • The warning also appears at the top of this section within settings.

Browsing/Site Data Types

Default: Disabled This applies to all site data types below.

  • Not available on Firefox Android.
  • Only affect automatic cleanup options.
  • The API for browsing data cleaning doesn't appear to support Firefox Containers. So if cookies from one container are cleared, then all of that site's data from all containers are deleted regardless of rules.
    • You are still able to enable both Containers and other browsing data cleanups. A warning appears just above the Container setting.
  • Due to the way this extension works, CAD will place a temporary cookie on all visited sites (that lasts for a few seconds) if you have the any of the other browsing data setting on. Note that it must be enabled BEFORE the site visit.
    • The cookie's name and content are very obvious to what the purpose is.
    • This shouldn't be a major issue as the name should be long enough to be unique.
    • Site Data from local files can not be automatically cleaned through this extension per browser API limitations.
    • Prior to 3.5.1, this cookie was created only if no other cookies exist.
    • In 3.5.1 and onward, this cookie will always be created to ensure that the data can be removed from subdomains as they need to be explicitly given. Some subdomains will only create cookies on the base/root domain.
  • As of CAD 2.1.2, the path is now a random ID to prevent fingerprinting

Enable Cache Support

Enable IndexedDB Support

Enable LocalStorage Support

Enable Plugin Data Support

Enable Service Workers Support

Extension Options

Enable Support for Firefox's Container Tabs

Default: Disabled

  • Mozilla Firefox Desktop Browser Only.
  • Enables cleaning support for Firefox's Container Tabs (and possibly extensions that utilizes Container Tabs).
  • If this is disabled, any new expressions created through the popup on that container will not be cleaned/looked at. Only the default (No Container) will be cleaned.
  • This extension does not play well with other extensions that operates in a 'temporary container mode' due to the fact that each container MUST be configured separately. There is no global list/configuration that will affect all containers (with the exception of the other browsing data items per note above).
  • Due to a bug in FF 55, 2.X.X+ will work only with this setting ON in FF 56+
  • Use 1.X.X for Firefox versions less than 56 (no support will be given for 1.x and 2.x versions).

Enable Automatic Removal of Expression List when its Container is Removed

Default: Enabled

  • Mozilla Firefox Desktop Browser Only.
  • Available from 3.6.0+
  • Automatically removes the related expression list and its expressions when its corresponding container is deleted.
  • This only affects newly deleted containers. Existing lists with no matching containers are not removed.

Log Total Number Of Cookies Deleted

  • Only available in <= 2.1.0
  • Keeps track of how many cookies are deleted
  • This is shown only in the Welcome Screen of the settings

Enable Cleanup Log and Counter

Default: Enabled

  • Keeps track of how many cookies are deleted
  • Creates a summary of each cleanup telling you which site's cookies were kept and which ones were clean and the reasons why
  • Useful for debugging your expression rules
  • Enabling this allows you to restore deleted cookies in CAD versions > 3.0.0

Show Number of Cookies for that Domain over the Icon

Default: Enabled

  • Not available on Firefox Android as no icons show up
  • Detects how many cookies that domain (excluding third-party cookies) is currently storing. Sets a little badge text over the browser icon of CAD.

Keep Default Icon on all list types

Default: Disabled

  • Available from 3.3.0+
  • Disabled: Icons will match the color of the list that the domain matches - Blue for WhiteList/KeepList/no cookies, yellow for GreyList/RestartList, red for no matching list.
  • Enabled: Icons will stay default (blue) regardless if domain is on a matching list.
  • NOTE: This will be disabled if 'show number of cookies for that domain over the Icon' above is disabled!
  • NOTE 2: Greyscale icon will appear if automatic cleaning is disabled, regardless of setting.

Show Notification After Automatic Cleanup

Default: Enabled

  • Show a notification about how many cookies and site data were deleted and for which domains.
  • Can be toggled from the Popup.
  • This is only for notifications via automatic cleaning ('clean' or 'clean, include open tabs'). Manual cleaning will still show notifications.

Show Notification from Manual Site Data Cleanups

Default: Enabled

  • Available from 3.5.0+
  • Show a notification about how many cookies and site data were deleted and for which domain. This normally only shows one domain.
  • This is only for notifications triggered from manual clean actions other than 'clean' and 'clean, include open tabs'.

Duration for Notifications

Default: 3 seconds

  • How long the notification should stay before automatically removing itself.
  • Minimum 1 second, Maximum 10 seconds.

Enable Popup when New Version is Released

Default: Disabled

  • Whenever this web extension is officially released and updated on your browser, a new tab will be created and show the Welcome page, which houses the Release Notes.
  • Keep it disabled to minimize distractions.
  • A new tab with the Welcome page will always be created for new installations (v3.2.0+).

Size of Popup

Default: 16 px

  • Available as of 3.3.1+
  • Sets the font size of popup
  • Default is 16 px as that was the browser default if it wasn't explicitly set.
  • Range from 10 to 24.
  • Note: Max browser popup width is 800px and height is 600px.

Size of Setting Pages

Default: 16 px

  • Available as of 3.3.1+
  • Sets the font size of the setting pages (i.e. the pages similar to where this setting can be adjusted)
  • Default is 16 px as that was the browser default if it wasn't explicitly set.
  • Range from 10 to 24.
  • After changing this setting, a refresh of the page is required.

Enable Context Menus

Default: false

  • Available as of 3.4.0+
  • Adds some usage through context menus (Right-clicks) on the Icon, Page, Link, and selected text.
  • Note that for selected text, you can have comma-separated values and it will be parsed for each.
  • Each selected text will simply be parsed through encodeURI before being added into the expression table.

Debug Mode

Default: Disabled

  • Added in 3.3.0+
  • Enable to output additional details to the console.
  • Note that some information that may be considered personal may be sent to console. Use your judgement when copy-pasting or taking a screenshot of it for issues. Some lines may be expanded further for details. Ensure that all lines are expanded when submitting a screenshot for issues so that it may assist in having it resolved sooner.
  • Extension console logs can be accessed by either:
    • about:devtools-toolbox?type=extension&id=CookieAutoDelete%40kennydo.com
    • about:debugging#/runtime/this-firefox and clicking 'Inspect' on CookieAutoDelete.

List of Expressions

Enter Expression

  • Enter expressions in this format:
    • google.com -> keep cookies only from google.com (and www.google.com - only www is included with the main domain option)
    • *.google.com -> keep cookies from google.com and subdomains (Ex. calendar.google.com, a.b.c.d.google.com)
    • TIP: the wildcard functions similarly as you would expect: gi*b.com will match gitlab.com and github.com
      • This means that if you want to set all cookies to delete after browser restart, add a * to the GreyList/RestartList
  • www.example.com matches a rule for example.com because the www part is stripped
  • As of v3.1.0, Regular Expressions can be entered in the form of /google\.(ca|com)/. Thanks to maltsev PR #649.
  • As of v3.1.0, Multiple Expressions can be entered. Just needs to be comma-separated and can be a mix of sites and regular expressions (e.g. *.github.com, example.com,/mozilla/) and each value will be added in separately. Spaces between commas are optional, and will be removed for each expression given. This only applies when creating new expression entries, not when editing existing entries - those are only for one domain (with wildcards), or one regular expression.

Keeping specific cookies

  1. Add the site/regular expression to the WhiteList/KeepList
  2. Uncheck Keep All Cookies
  3. Check the box with the cookie names you wish to keep

KeepList

WhiteList

  • Sites on the WhiteList/KeepList will usually not be cleaned by CAD unless otherwise configured.
    • Note that cookies may be marked as session only or has an expiry date in the past and removed by the browser.
  • Useful for sites where you want to stay logged in

RestartList

GreyList

  • Sites on the GreyList/RestartList will usually only be kept until the next browser startup.
    • Check Keep All Cookies to clear all related cookies for that expression upon browser restart.
    • Check specific cookie names to clear it upon browser restart. The rest will be treated as non-listed.
  • Useful for sites where the user wants to stay logged in but eventually clean the site's cookies on browser restart
  • Note that the cleanup may not work as intended if you have the browser session restored upon restart and that domain is still part of the opened tabs, even if 'Clean Cookies from Open Tabs at Startup' is checked, as that tab may have completed loading before the cleanup happened. A refresh of that tab after a few seconds may resolve this.

Importing Expressions

(Initial Format Courtesy of ElectricFeet, revised 2020/01/29 courtesy of Urbs3w / issue #396 and jsrath / issue #602)

Revised to include specific containers and cookie names to keep/clear on reboot.

WARNING/NOTE: Imported Expressions MAY overwrite existing expressions if the expression is the same (this includes multiple expressions as it will be split upon import)! It will not delete any existing ones.

  • Create a .json file with the format:

    {
      "default": [
        {
          "expression": "/mozilla/, /example.com/",
          "listType": "WHITE",
          "storeId": "default",
          "cleanLocalStorage": false,
          "cookieNames": [
            "_gid",
            "taarId"
          ],
          "id": "This could be a comment that exists only in file",
          "cleanAllCookies": false
        },
        {
          "expression": "github.com",
          "listType": "GREY",
          "storeId": "default"
        },
        {
          "expression": "example.com",
          "listType": "WHITE",
          "storeId": "default"
        }
      ],
      "firefox-container-1": [
        {
          "expression": "example.com",
          "listType": "WHITE",
          "storeId": "firefox-container-1"
        }
      ]
    }
  • In the Settings panel, select the "Import Expressions" button in the "List of Expressions" tab.

  • For Each Expression Object Item:

    Setting Item Example Description / Comments Required / Optional
    expression "*.mozilla.org, /example/, github.com" The domain / regex in question. Multiple domains must be comma-separated within one set of quotes only. If there are multiple comma-separated domains in one expression object item, each will have a copy of the settings noted in that item. Required
    listType "KEEP" The list for expression to be categorized under. Currently only WHITE (KEEP) or GREY (RESTART). Required
    storeId "default" For Chrome and Firefox (non-containers), it is default. Firefox container users will have additional storeId e.g. firefox-container-1. See example above for usage. Note that the display name in Firefox is currently not used in imports. This should be the same name as the parent container. Required
    cleanLocalStorage true Clean localstorage for expression given. optional
    cookieNames [ "coo_kie", "tz", "example" ] List of cookies to be checked. Action depends on listType optional
    id YTEBGFv While this is exported from CAD, it is not used in import and can be used as a comment line for that expression that is only visible within the file itself. optional
    cleanAllCookies true Cleans All Cookies. (Will Ignore cookieNames when cleaning) optional
  • Multiple Containers (Firefox only)

    • Expressions are grouped by container.
        {
          "default": [
            ...
            "storeId": "default",
            ...
          ],
          "firefox-container-1": [
            ...
            "storeId": "firefox-container-1",
            ...
          ]
        }
      

Cleanup Log

  • The cleanup log can be used as a quick way to see which sites were deleted or for debugging why a site's cookies are being kept or cleaned.
  • Each individual cleanup object has a datetime stamp and a summary of which sites were deleted
  • You can expand this to show more information

Filtering options

  • After expanding, you can use the filtering options to filter sites by Keep (Green) or Clean (Red)
    • This is currently disabled, and will reappear in future versions.