diff --git a/Dynamic-filtering:-rule-syntax.md b/Dynamic-filtering:-rule-syntax.md index 2e997bd..4173de7 100644 --- a/Dynamic-filtering:-rule-syntax.md +++ b/Dynamic-filtering:-rule-syntax.md @@ -10,6 +10,8 @@ A dynamic filtering rule is made of four components: a source hostname, a destin Source hostname always correspond to the hostname extracted from the URL of the web page in the browser. The destination hostname correspond to the hostname extracted from the URL of a remote resource which the web page is fetching (or trying to). The type is the type of the fetched resource. A request can be blocked, allowed, or ignored. +*** + ### Type-based rules Type-based rules are used to filter specific types of request on a web page. There currently exists seven types of request which can be dynamically filtered: @@ -28,6 +30,8 @@ Another example: `wired.com * image block`, which means "block images from all o Note that with type-based rules, the destination hostname is **always** `*`, meaning "from anywhere". +*** + ### Hostname-based rules Hostname-based rules are used to filter network resources according to their origin, i.e. according to which remote server a resource is pulled. Hostname-based rules have a higher specificity than type-based rules, and thus hostname-based rules always override type-based rules whenever a network request end up matching both a type- and a hostname-based rule. @@ -38,6 +42,8 @@ For example, `* disqus.com * block` means "globally block all net requests to `d Just like type-based rules, a hostname-based rule can apply only when visiting a specific web site, for example: `wired.com disqus.com * noop`, which means "do not apply dynamic filtering to net requests to `disqus.com` when visiting a web page on `wired.com`. Since this last rule is more specific than the previous one, it will override the global blocking of `disqus.com` everywhere. +*** + ### Actions A matching rule can do one of three things: