Chromium Limits on Ad-Blocking Extension Rulesets
This article provides a quick overview of the specific limits the
Chromium web browser imposes on ad-blocking extensions under the
Manifest V3 architecture. Through the declarativeNetRequest
API, Chromium enforces strict quotas on the number of static rulesets,
enabled rulesets, and dynamic rules an extension can register to
preserve browser performance and user security. Below is a direct
breakdown of the exact numerical limits for static, dynamic, session,
and regular expression rules.
Static Ruleset Limits
Static rulesets are pre-packaged lists of blocking or modification rules included directly within the extension's package when it is uploaded to the web store. Chromium imposes limits on both the number of ruleset files and the total number of individual rules they contain:
- Total Registered Static Rulesets: An extension can
define a maximum of 100 static rulesets in its
manifest.jsonfile. - Enabled Static Rulesets: Out of the 100 possible static rulesets, an extension can only have a maximum of 50 rulesets active (enabled) at any given time.
- Guaranteed Minimum Static Rules: Every individual extension is guaranteed the ability to enable at least 30,000 static rules across its active rulesets.
- Global Static Rule Pool: Beyond the 30,000 guaranteed rules, Chromium provides a shared global pool of 300,000 rules across all installed extensions. An extension can use rules from this global pool up to the 330,000 theoretical maximum, provided other installed extensions have not already exhausted the shared pool.
Dynamic and Session Rule Limits
Unlike static rulesets, dynamic and session rules are not separated into multiple named rulesets. Instead, Chromium treats them as one dynamic ruleset and one session ruleset per extension, allowing the extension to add or remove rules programmatically while the browser is running.
Dynamic Rules
Dynamic rules persist across browser restarts and extension updates. Chromium divides dynamic rule limits based on whether the rules are considered "safe" (such as simple blocking or allowing rules) or potentially "unsafe" (such as redirecting requests or modifying headers):
- Total Dynamic Rules: An extension can register up to 30,000 safe dynamic rules.
- Unsafe Dynamic Rules: Within that 30,000 limit, an extension can only register a maximum of 5,000 unsafe rules.
Session Rules
Session rules are temporary and are wiped from memory as soon as the browser is closed. They are often used for temporary user-defined exceptions or immediate threat mitigation.
- Total Session Rules: An extension can register a maximum of 5,000 session rules, regardless of whether they are classified as safe or unsafe.
Regular Expression (Regex) Rule Limits
Rules that use regular expressions to match URLs consume significantly more CPU and memory than standard filter rules. Consequently, Chromium imposes a much stricter sub-limit on regex rules, which counts toward the broader rule limits mentioned above:
- Static Regex Rules: An extension can enable a maximum of 1,000 regular expression rules across all of its active static rulesets.
- Dynamic and Session Regex Rules: An extension can register a maximum of 1,000 regular expression rules within its dynamic rules, and another 1,000 within its session rules.
- Memory Limit per Regex Rule: In addition to the count limit, each individual compiled regex rule cannot exceed 2KB in memory size.