mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Updated Cosmetic filtering in µBlock (markdown)
parent
406410158e
commit
a6f973545c
1 changed files with 3 additions and 1 deletions
|
|
@ -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_).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue