[ Web Proxy ]
URL:
Viewing: https://brave.com/privacy-updates/1-web-resource-replacements/ [Back]  [Original]

Web resource replacements | Brave

Web resource replacements

Published Jan 23, 2020

Problem: Blocking Trackers Sometimes Breaks Sites

One of many ways Brave protects your privacy on the Web is by blocking requests to trackers. By blocking these requests, Brave prevents you from being followed around the Web, and from ad companies, data brokers, and other privacy-harming parties from recording your online activity.

In most cases, just blocking these requests is enough. Tracker code is usually unrelated to the main things a site does, and so blocking tracking-related JavaScript doesnt affect the rest of the sites behavior. In these cases (the vast majority of cases) Brave can protect your privacy, transparently and without issue.

In some cases though, sites break if tracking-related code is blocked. This can be the result of an intentional choice on the part of the sites developers, or an unintended side effect of other choices. Whatever the sites intent, the effect is the same; users are forced to choose between either protecting their privacy, or accessing a website. These sites mix tracking-related code with the core user-serving code; blocking the former breaks assumptions made by the latter, breaking the site.

This can manifest itself in other, subtler ways too. Some trackers punish people using privacy tools by introducing pauses, slowdowns, or blank screens. In such cases, web sites dont hard-break, but become less pleasant to use.

Because of this problem, privacy tools are forced into a lose-lose situation: either break the website (but protect users privacy), or allow the invasion of privacy (but keep the site working as expected). Neither of these options is acceptable to Braves mission of a privacy-preserving, pleasant-to-use, user-focused Web.

Example: Google Analytics and The 4-Second Blank Screen

A common, representative example of trackers punishing privacy-protecting users is Google Analytics. Google Analytics is an extremely popular library that allows sites to track and record information about you across the Web. This includes information about where you live, your gender, interests, and lifestyle choices, among other information. Given how sensitive such information is, many, many privacy-protecting tools (including Brave) identify Google Analytics as a tracker and block it.

Possibly as a result of this blocking, Google suggests that site owners make their sites less pleasant to use for people who block Google Analytics (ironically, Google refers to this as optimizing a site). Specifically, Google suggests sites use a particular way of including Google Analytics that makes the page blank for four seconds if Google Analytics is blocked. Not surprisingly, this has the effect of incentivising users to reduce their privacy, all so that Google can do a better job of tracking you.

Solution: Dont Just Block, Replace

Because trackers sometimes punish (intentionally or otherwise) people who want to protect their privacy online, it is not enough to just block known trackers; sometimes tracking code needs to be replaced with new code that both preserves privacy and keeps sites from breaking or degrading.

This functionality is in Brave Beta today, you can test it now, and we expect itll be part of the next Brave stable release.

If youre using Brave Beta (or Dev), try loading a site that includes Google Analytics, like The Verge. You should notice that the page loads quickly, and if youre watching your network traffic (say, using a man-in-the-middle proxy), youll also see that no requests are made to google-analytics.com. However, if you look at the developer tools, youll see a successful request, but for a new, not-Google authored piece of code. This code is carefully written to prevent Google from tracking you, but without impacting page functionality.

[]

Another example is Natures Scientific Reports site, shown in the above video. If you load the site using a standard blocking extension (like AdBlock Plus on Chrome or Firefox), the page has an unpleasant 4-second pause before displaying. Loading the same site in Brave shows the page immediately, while still blocking the same trackers.

This is just one of many examples where Brave uses this replacement-functionality to better protect Web privacy. Currently we use replacement libraries authored by the excellent uBlock Origin project, and will be sharing replacements we author too. This functionality is implemented through Braves open-source adblock library, written in Rust for speed and security (also available as a node module).

Conclusion

Protecting privacy online requires vigilance and innovation from us at Brave, but taking advantage of these privacy protections is easy for Web users. Just by using Brave you automatically benefit from protections like the ones described in this blog post. Resource replacement is just one of many ways Brave protects Web users, and we have many new projects and plans underway. Were excited and looking forward to sharing them with you soon.

Look for more updates here to learn about new ways Brave is fighting for a private, performant, and user-focused Web.

Share on X (formerly Twitter) Share on Reddit Share on Telegram Share on LinkedIn
Next: Third-party cosmetic filtering

Related articles

Brave improves protections against GPU fingerprinting

Aug 13, 2026

Starting in version 1.93, Brave is rolling out new protections against GPU and graphics-driver fingerprinting, de-identifying WebGL vendor and renderer strings and adding noise to the list of supported extensions.

Read this article

Brave’s unique Shred button now available for Android, letting users enhance their privacy by easily discarding tracking site data

Apr 22, 2026

Starting with version 1.89, Brave for Android brings Shred from iOS, so you can clear one site's data without logging out of others, with optional Auto Shred on tab or browser close.

Read this article

Brave overhauls adblock engine, cutting its memory consumption by 75%

Jan 5, 2026

Brave has overhauled its Rust-based adblock engine to reduce memory consumption by 75%, bringing better battery life and smoother multitasking to all users.

Read this article
Get Brave

Web Proxy Viewer  |  New URL  |  Original Page