diff --git a/docs/general/ad-filtering/create-own-filters.md b/docs/general/ad-filtering/create-own-filters.md index 4260eee82e9..afbba2d1b09 100644 --- a/docs/general/ad-filtering/create-own-filters.md +++ b/docs/general/ad-filtering/create-own-filters.md @@ -274,11 +274,11 @@ Basically, they just limit the scope of rule application. | [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | | [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | -| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$header](#header-modifier) | ✅ | 🧩 [**](#header-modifier-limitations) | 🧩 [**](#header-modifier-limitations) | ❌ | ❌ | ❌ | | [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [$method](#method-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | -| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$popup](#popup-modifier) | ✅ [***](#popup-modifier-limitations) | ✅ | ✅ | ✅ [***](#popup-modifier-limitations) | ✅ [***](#popup-modifier-limitations) | ❌ | | [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [$to](#to-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | @@ -286,8 +286,7 @@ Basically, they just limit the scope of rule application. - ✅ — fully supported - ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details - -- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions - ❌ — not supported ::: @@ -477,7 +476,7 @@ h_value = string / regexp where: -- **`h_name`** — required, an HTTP header name. It is matched case-insesitively. +- **`h_name`** — required, an HTTP header name. It is matched case-insensitively. - **`h_value`** — optional, an HTTP header value matching expression, it may be one of the following: - **`string`** — a sequence of characters. It is matched against the header value lexicographically; - **`regexp`** — a regular expression, starts and ends with `/`. The pattern works the same way as in the basic URL rules, but the characters `/`, `$` and `,` must be escaped with `\`. @@ -491,9 +490,22 @@ The modifier part, `":" h_value`, may be omitted. In that case, the modifier mat - `@@||example.com^$header=set-cookie:/foo\, bar\$/` unblocks requests whose responses have the `Set-Cookie` header with value matching the `foo, bar$` regular expression. - `@@||example.com^$header=set-cookie` unblocks requests whose responses have a `Set-Cookie` header with any value. +##### `$header` modifier limitations {#header-modifier-limitations} + +:::caution Restrictions + +1. The `$header` modifier can be matched only when headers are received. + So if the request is blocked or redirected at an earlier stage, the modifier cannot be applied. +1. In Adguard Browser Extension, the `$header` modifier is only compatible with + [`$csp`](#csp-modifier), [`$removeheader`](#removeheader-modifier), [`$important`](#important-modifier), + and [`$badfilter`](#badfilter-modifier). + +::: + :::info Compatibility -Rules with the `$header` modifier are supported by AdGuard for Windows, Mac, and Android with [CoreLibs] v1.11 or later. +Rules with the `$header` modifier are supported by AdGuard for Windows, AdGuard for Mac, and AdGuard for Android +with [CoreLibs] v1.11 or later, and AdGuard Browser Extension with [TSUrlFilter] v3.0.0 or later. ::: @@ -565,16 +577,24 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `||domain.com^$popup` — if you try to go to `http://domain.com/` from any page in the browser, a new tab in which specified site has to be opened will be closed by this rule. -:::info Compatibility +##### `$popup` modifier limitations {#popup-modifier-limitations} + +:::caution Limitations -- `$popup` modifier works best in AdGuard Browser Extension. -- In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. -- In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it will not be blocked. - `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. +1. The `$popup` modifier works best in AdGuard Browser Extension. +1. In AdGuard for iOS and AdGuard for Safari, `$popup` rules simply block the page right away. +1. In AdGuard for Windows, AdGuard for Mac, and AdGuard for Android, the `$popup` modifier may not detect a popup + in some cases and it will not be blocked. + The `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. -- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. + +::: + +:::info Compatibility + +Rules with the `$popup` modifier are not supported by AdGuard Content Blocker. :::