Does AdGuard for iOS support Extended CSS selectors?

avatar

Administrator
Staff member
Administrator
They don't work even with extension not using Content Blocker API?
They do work in Safari for MacOS as we can use content scripts there.

However, they do not work in iOS as we're limited to content blocking API there.
 

gotitbro

Member
@avatar @vasily_bagirov Thanks for the answers. I have one more question, in Adguard for iOS I have selected 4 filter lists (English Filter, Spyware Filter, Mobile Filter and Safari Filter) and these lists easily have more 80,000 filters in them but in the app it shows that some 26,000 filters are selected. I would like to ask what filters are not being used in the iOS version?
 

vasily_bagirov

Administrator
Staff member
Administrator
@gotitbro not all rules that are present in, say, Adguard for Windows, are applicable for Safari on iOS. This is why the total number displayed is less than you could expect.
 

avatar

Administrator
Staff member
Administrator
@gotitbro iOS uses "optimized" versions of Adguard filters.

English filter:
https://filters.adtidy.org/extension/chromium/filters/2.txt

Optimized English filter:
https://filters.adtidy.org/extension/chromium/filters/2_optimized.txt

What is optimization?

If you ever tried Adguard browser extension, you might've seen "Send ad filters usage statistics" checkbox there. It is disabled by default, but some people opt to help us and enable it manually. Actually, there are pretty many of those, who did it.

So, when this box is checked, Adguard extension collects & sends stats on filtering rules actually used:
https://adguard.com/en/filter-rules-statistics.html

The only purpose of the usage statistics is to get rid of obsolete filtering rules.
So we use it to build "optimized" filters by removing obsolete and rarely used rules.
 

gotitbro

Member
@avatar I had actually read about optimized filters before starting this thread and was thinking that this might be the case, do you plan on introducing this in the iOS or Android apps?

Also another question:
Which updates faster https://adguard.com/en/filter-rules.html?id=2 or https://filters.adtidy.org/extension/chromium/filters/2.txt ?
Which one should I use when I want to test Adguard filters in another extension? I have seen that the former one (https://adguard.com/en/filter-rules.html?id=2) pulls the changes very late from GitHub.
 

avatar

Administrator
Staff member
Administrator
@avatar I had actually read about optimized filters before starting this thread and was thinking that this might be the case, do you plan on introducing this in the iOS or Android apps?
Both apps already use optimized filters (and cannot use "full" filters, btw).

The second one (filters.adtidy.org) is the proper URL.

The first URL is just for quick observing the filter contents; it shouldn't be used by ad blockers to get the filter's contents.
 

gotitbro

Member
Both apps already use optimized filters (and cannot use "full" filters, btw).
I meant collecting data about filter usage from these apps.

The first URL is just for quick observing the filter contents; it shouldn't be used by ad blockers to get the filter's contents.
When I was looking for Adguard filters to add, these first URL was the only URL available on the adguard website, where are the adtidy.org filters listed?
 

avatar

Administrator
Staff member
Administrator
I meant collecting data about filter usage from these apps.
What stops us from adding this option is that it's much harder to implement it in case of standalone filtering apps.
Moreover, in the case of iOS it is impossible, content blocking API do not provide any "feedback" on what was actually applied.

However, it makes sense to collect data in Android, Windows, and Mac as they support more rule types, which cannot be covered by the browser extensions.

When I was looking for Adguard filters to add, these first URL was the only URL available on the adguard website, where are the adtidy.org filters listed?
Yeah, we should have changed the /filters.html page and put proper URLs there. We'll do it next week.
 

avatar

Administrator
Staff member
Administrator
You can do it in the Pro version though?
In the case of Pro version, we can learn which domain was blocked, but this information is not very helpful comparing to what we get from browser extensions.
 

gotitbro

Member
@avatar I see, there are a few more question I have about "optimized filters" though:
How is it decided which filters are to be removed? Are the filters removed automatically based on statistics or do the filter list maintainers decide which filters to remove and handle the data (stats) manually?

If I visit a site which has filters for it in the normal/full list but not in the optimized list what is done to mitigate this issue?
 

avatar

Administrator
Staff member
Administrator
How is it decided which filters are to be removed? Are the filters removed automatically based on statistics or do the filter list maintainers decide which filters to remove and handle the data (stats) manually?
1. We optimize only massive filters like EasyList and English filter.
2. Each filter, marked as "optimized", has a "compression level" property set by us.
3. For instance, "compression level" for English filter is configured to 40%. It means, that optimization algorithm should strip 60% of rules.
4. Rules are sorted by the number of hits, and the most rarely used are removed.

That's more or less it.

Filters maintainers can file a report to us if a rule should not be removed.

If I visit a site which has filters for it in the normal/full list but not in the optimized list what is done to mitigate this issue?
Nothing, and nothing can be done at least in case of the iOS app, as there is no feedback provided by Safari.
 

gotitbro

Member
Nothing, and nothing can be done at least in case of the iOS app, as there is no feedback provided by Safari.
In that case I will manually have to add the filter (that is already in the normal/full filter but not in the "optimized filter") to my User Filter's to resolve the issue, right?
Also, what is done in the case of Android/Windows etc.?
 
Top