We are trying to implement ad blockers using the Safari web extension, and we are implementing this using the declarativeNetRequest, with a manifest version 2. We have added a json file which contains a rule set for over 22000 URLs, does content blocker have a limit to the number of rules we set in json?
Although it does work fine, sometimes we see the behaviour different on simulators and on clearing the cache it works fine is this expected?
The rule limit for a Safari content blocker is 150,000 rules, Safari Web Extension declarativeNetRequest rules are translated into content blocker rules, and that limit is also 150,000 rules. Additionally for Web Extensions, we have a limit of: 100 static rulesets 50 enabled rulesets 30,000 dynamic and session rules
I would say using a content blocker vs Safari Web Extension depends on what you are doing. What does your extension do? If you need to hide content on the page, currently that is only possible with Safari Content Blockers.