-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using if-top-url/unless-top-url
in newer Safari versions
#20
Comments
if-domain
and unless-domain
to if-top-url
and unless-top-url
if-domain
/unless-domain
with if-top-url/unless-top-url
Regex from the subject is not correct, I've used the next one.
I've generated random 50000 rules like
After that, I've tried the filter with real rules https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_2_English/filter.txt
With both kinds of triggers I didn't notice that the browser become slowly |
We should do that experiment one more time after iOS 15 is out and we can create content blockers with 150k rules. I am not yet sure how important this slowdown will be. |
if-domain
/unless-domain
with if-top-url/unless-top-url
if-top-url/unless-top-url
in newer Safari versions
UPDATE: Safari 18 supports using both This changes a lot. For instance, we can use |
Example:
if-domain: [ "example.org", "*example.org" ]
-->if-top-url: [ "^[htpsw]+:\\/\\/://([a-z0-9-]+\\.)?example.org/" ]
Ideally, we'll simply need a JSON built with this new approach. Once we have it, we'll be able to see how long it takes Safari to compile such a content blocker and whether it's faster or not.
The text was updated successfully, but these errors were encountered: