cookie-remover

The cookie-remover removes certain cookies. You can parse document.cookie to set the expiration dates in the past for cookies that match targeted patterns.

Parameters

NameDescriptionMandatory

cookie

A pattern that matches the name of the cookie(s) you want to remove. If the string starts and ends with a slash (/), the text in between is treated as a regular expression.

Yes

autoRemoveCookie

Default value: false. When set to true, this parameter enables the snippet to continuously monitor the targeted cookie, checking for its presence every 1000 ms. If the cookie is found, it will be repeatedly removed. To use only in case the website sets back the cookie after removal.

No

Filter examples

The following table lists examples that use the abort-on-iframe-property-write snippet:

FilterResult

cookie-remover adb

Removes any cookie that matches adb.

cookie-remover adb true

Removes every second any cookie that matches adb.

Debugging

The following table contains messages you'll find useful during debugging:

MessageWhen the message occursDefinition

DEBUG cookie-remover Parsing cookies for matches

Before parsing begins

The first message displayed, indicating that parsing is about to begin

DEBUG cookie-remover Set expiration date on cookieName

Each time a match is found

This message contains the name of the cookie you just removed.

Last updated