I’m working on a PR to bring content blocking to SkipWeb. The main challenge is that iOS and Android expose very different capabilities here, so we need to make an early design decision with real long-term consequences.
For scale: a typical blocker may ship with around 50,000 rules, combining network request blocking and CSS-based hiding.
On iOS, WKWebView provides a mature and fairly prescriptive model through WKContentRuleListStore and related APIs:
- The app provides rule files in Apple’s prescribed format.
- WebKit compiles those rules into an optimized internal representation.
- WebKit is then responsible for applying the rules efficiently at runtime.
On Android, WebView is much more low-level. It provides enough hooks to implement content blocking in an ad hoc way, but it does not provide a built-in content-blocking system comparable to WebKit’s:
shouldInterceptRequest can be used to block network requests.
- Injection APIs can be used to insert CSS that hides known page elements.
- The app developer is responsible for deciding which rules apply for a given page, frame, or request, and for handling indexing, lookup, and runtime evaluation.
- Some rule shapes from the
WKWebView world do not map neatly onto Android. For example, rules that depend on both the top-level page URL and a subframe URL are difficult to reproduce, because CSS often needs to be injected before the full frame structure is known.
Because iOS already has a mature optimized pipeline, it seems natural to use it there. The main design question is what SkipWeb should do on Android.
Option 1: SkipWeb provides a WKContentRuleListStore-like abstraction
SkipWeb would consume iOS-style rule files, index them on first launch, cache the derived data, and apply them on Android as closely as possible.
✅ Pros:
- Easier migration for teams already using iOS/WebKit rule lists.
- Gives developers a more unified cross-platform surface.
- Reduces the amount of blocker-specific infrastructure each app has to build.
❌ Cons:
- Substantially more complexity and long-term maintenance burden in
SkipWeb.
- Unclear upfront performance cost for indexing large rule sets.
- Likely additional disk usage if large rule files need to be transformed or duplicated for indexing.
- Android support would still be best-effort, because some iOS rule semantics do not map cleanly to Android APIs.
- Developers may lose flexibility, since this effectively forces an iOS-shaped model onto Android.
Option 2: SkipWeb exposes Android-oriented primitives
SkipWeb would provide content-blocking-friendly wrappers around shouldInterceptRequest plus hooks for CSS injection, while leaving rule format, indexing, and matching strategy to the app developer.
✅ Pros:
- Much simpler and lower-risk design for
SkipWeb.
- More transparent and less “magical.”
- Gives app developers full control over rule format, indexing strategy, and tradeoffs.
- Lets Android implementations be designed around Android’s actual constraints instead of imitating WebKit.
❌ Cons:
- Shifts substantial complexity onto app developers.
- Increases adoption friction, since each app may need to build its own rule pipeline.
- Makes cross-platform reuse of existing iOS rule sets harder.
@marcprux I am happy to work on either one of the 2 options - but considering the substantial tradeoffs either way, it would be helpful to know which side makes more sense from the perspective of the Skip platform
I’m working on a PR to bring content blocking to
SkipWeb. The main challenge is that iOS and Android expose very different capabilities here, so we need to make an early design decision with real long-term consequences.For scale: a typical blocker may ship with around 50,000 rules, combining network request blocking and CSS-based hiding.
On iOS,
WKWebViewprovides a mature and fairly prescriptive model throughWKContentRuleListStoreand related APIs:On Android,
WebViewis much more low-level. It provides enough hooks to implement content blocking in an ad hoc way, but it does not provide a built-in content-blocking system comparable to WebKit’s:shouldInterceptRequestcan be used to block network requests.WKWebViewworld do not map neatly onto Android. For example, rules that depend on both the top-level page URL and a subframe URL are difficult to reproduce, because CSS often needs to be injected before the full frame structure is known.Because iOS already has a mature optimized pipeline, it seems natural to use it there. The main design question is what
SkipWebshould do on Android.Option 1:
SkipWebprovides aWKContentRuleListStore-like abstractionSkipWebwould consume iOS-style rule files, index them on first launch, cache the derived data, and apply them on Android as closely as possible.✅ Pros:
❌ Cons:
SkipWeb.Option 2:
SkipWebexposes Android-oriented primitivesSkipWebwould provide content-blocking-friendly wrappers aroundshouldInterceptRequestplus hooks for CSS injection, while leaving rule format, indexing, and matching strategy to the app developer.✅ Pros:
SkipWeb.❌ Cons:
@marcprux I am happy to work on either one of the 2 options - but considering the substantial tradeoffs either way, it would be helpful to know which side makes more sense from the perspective of the
Skipplatform