w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Other
594 stars 54 forks source link

Specify declarativeNetRequest rules #87

Closed chrmod closed 6 months ago

chrmod commented 2 years ago

As of September 2021, we have two implementations of declarativeNetRequest - Chrome and Safari. Sadly those implementations are quite different. This issue focuses on the Rules only.

References:

Big issue for content blockers is a format in which the block rule condition should be expressed. Chrome seem to favor urlFilter but Safari only allows regexFilter. regexFilter on the other hand is heavily limited on Chrome to just a 1000 rules specified by MAX_NUMBER_OF_REGEX_RULES (this is likely due to poor performance of Chrome's blocking engine).

For that reason, content blockers have to generate two sets of rules sets, one for Chrome and one for Safari, which is another difference and add up to the cost extension developers have to pay due to the enforcement of declarativeNetRequest.

dotproto commented 2 years ago

Changed the title from "standardize" to "specify" as standardization is outside this group's charter. We can discuss, align on, and even produce technical reports that specify these rules, but standardization is explicitly outside our purview.

xeenon commented 6 months ago

Safari does support urlFilter now, we translate it to a regex for our implementation.