From a6f973545c3f55ab97fc5443a35913404e4df4d8 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 14 Aug 2014 14:38:52 -0700 Subject: [PATCH] =?UTF-8?q?Updated=20Cosmetic=20filtering=20in=20=C2=B5Blo?= =?UTF-8?q?ck=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cosmetic-filtering-in-µBlock.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cosmetic-filtering-in-µBlock.md b/Cosmetic-filtering-in-µBlock.md index 48cf89e..0414de2 100644 --- a/Cosmetic-filtering-in-µBlock.md +++ b/Cosmetic-filtering-in-µBlock.md @@ -8,7 +8,9 @@ The result is significant gain in memory and page load efficiency. This gain in However the inconvenience is that the HTML elements which need to be hidden from view through cosmetic filtering may appear briefly before disappearing, because the generic cosmetic filters which have been picked as a result of the survey take effect after the page displays. -One solution to mitigate this was to introduce a while ago the concept of entity-based cosmetic filters. This new class of cosmetic filters allows µBlock to inject such cosmetic filters without having to wait for the primary DOM to be available, hence the HTML elements which are targeted will be hidden early enough, before the page displays. So far only the generic filters which purpose is to hide ads on Google search page have benefited from that new class of cosmetic filters. This was a best-case scenario for such cosmetic filters, because ads for the Google search page must be hidden on `google.com`, `google.ca`, `google.com.br`, etc. For example, there exist entity-based filters for `google.*`, which means they will be injected in any of the Google domain. +One solution to mitigate this was to introduce a while ago the concept of entity-based cosmetic filters. This new class of cosmetic filters allows µBlock to inject such cosmetic filters without having to wait for the primary DOM to be available, hence the HTML elements which are targeted will be hidden early enough, before the page displays. + +So far only the generic filters which purpose is to hide ads on Google search page have benefited from that new class of cosmetic filters. This was a best-case scenario for such cosmetic filters, because ads for the Google search page must be hidden on `google.com`, `google.ca`, `google.com.br`, etc. For example, there exist entity-based filters for `google.*`, which means they will be injected in any of the Google domain. Not being able to use a wildcard as suffix is why Adblock Plus is forced to use generic cosmetic filters for those filters which purpose is to remove ads from Google search web page. Still, entity-based filters are not a solution for the vast majority of generic cosmetic filters (14,000+ generic cosmetic filters just in _EasyList_).