Skip to content

uBlock Origin 在 Firefox 里表现最佳

fang5566 edited this page Feb 13, 2021 · 11 revisions

本文档解释了为何说 uBO 在 Firefox 里表现最佳。

解除隐藏 CNAME

Ability to uncloak 3rd-party servers disguised as 1st-party through the use of CNAME record. The effect of this is to make uBO on Firefox the most efficient at blocking 3rd-party trackers relative to other other browser/blocker pairs:

c
The dark green/red bars are uBO before/after it gained ability to uncloak CNAMEs on Firefox.
Source: "Characterizing CNAME Cloaking-Based Tracking on the Web" at Asia Pacific Network Information Centre

HTML 过滤

HTML 过滤 的作用是在 HTML 文档的响应部分被浏览器解析 之前 就对其进行过滤。

例如它允许 HTML 文档中的特定 tag 在被浏览器解析和执行以前就将其移除,其他浏览器则没有可靠方式能做到。这项功能所需的 webRequest.filterResponseData() API,目前只有 Firefox 能提供。

浏览器启动

浏览器启动时,Firefox 会等待 uBO 准备好并从已打开的标签页屏蔽网络请求。

但基于 Chromium 的浏览器却并非如此。跟踪器和广告可能在 uBO 启动前就找到钻入已打开标签页的办法,而在 Firefox 里它们都被正确屏蔽了。

能够在浏览器启动前就可靠屏蔽对使用默认拒绝模式屏蔽第三方资源和 JavaScript 来说尤为重要。

预读取

Pre-fetching, which is disabled by default in uBO, is reliably prevented in Firefox, while this is not the case in Chromium-based browsers.

Chromium-based browsers give precedence to websites over user settings when it comes to decide whether pre-fetching is disabled or not.

See documentation for "Disable pre-fetching" .

WebAssembly

The Firefox version of uBO makes use of WebAssembly code for core filtering code paths. This is not the case with Chromium-based browsers because this would require an extra permission in the extension manifest which could cause friction when publishing the extension in the Chrome Web Store.

存储压缩

The Firefox version of uBO use LZ4 compression by default to store raw filter lists, compiled list data, and memory snapshots to disk storage.

Clone this wiki locally