Procedural filtering for better adblocking
Starting with version 1.73, Brave is significantly improving its adblocking capabilities by adding support for procedural cosmetic filtering of page elements.
Read this article →By the Brave Privacy Team
This is the 32nd post in an ongoing series describing new privacy features in Brave. This post describes work done by Pavel Beloborodov (Senior Software Engineer), and was written by Shivan Kaul Sahib (Lead for Privacy Engineering).
Starting with desktop version 1.75, advanced Brave users will be able to write and inject their own scriptlets into a page, allowing for better control over their browsing experience.
Customize a website’s appearance with custom scriptlets
Brave already offers the cleanest and safest out-of-the-box browsing experience of any Web browser. Users get best-in-class 3rd-party ad and tracker blocking, privacy protections, cookie notice blocking, and many other enhancements (read more on our privacy updates blog series). Most importantly, these features are enabled by default, so users get the best possible experience the moment they install Brave. There’s no need to manually install Web extensions (and take on the risk of malware) or worry about Google’s Manifest V3 changes. With Brave, things just work.
However, some users want the freedom to customize how ads and trackers are blocked in their browser. In addition to offering the ability to write custom filters and subscribe to community-maintained ones, we now support custom scriptlets that enable advanced users to write JavaScript and inject it into any website.
Adblockers like Brave Shields, uBlock Origin, and Adguard already use scriptlets internally for extended blocking capabilities. For instance, they can load a harmless version of a tracking script instead of the real one, maximizing privacy while minimizing breakage. Custom scriptlets bring this same power to Brave users. However, this power requires extreme caution. Only scripts that are confirmed safe should be injected, and for this reason the feature is “gated” behind a Developer mode flag in Shields > Content filtering.
Custom scriptlets are stored locally in your browser, and never leave the device.
Once the scriptlet is done, you can visit the website you just modified to see the difference:
Before: stackoverflow.com without the custom scriptlet
After: cleaned up stackoverflow.com with the custom scriptlet which removed the sidebars
You can easily edit or delete your custom scriptlet using the buttons on the right.
By default, Brave prevents fingerprinting while ensuring functionality on websites by randomizing the output of many Web APIs. But with custom scriptlets, you could completely disable a Web API on a website you don’t trust. You could also inject a scriptlet to prevent websites from disabling right-click. The possibilities are endless.
Brave prioritizes the user first, in line with the W3C’s priority of constituencies. Our bet on best-in-class 3rd-party ad and tracker blocking reflects this user-first approach. We initially built custom scriptlets to help us with our own adblock-related debugging, but decided to release it as a feature because it proved so useful. Please give it a try, and tell us what you think on community.brave.com, GitHub or social media.
Starting with version 1.73, Brave is significantly improving its adblocking capabilities by adding support for procedural cosmetic filtering of page elements.
Read this article →Starting with iOS version 1.71, Brave is rolling out a way to quickly delete browsing data that sites can use to identify you across visits. It's called Shred.
Read this article →Starting with version 1.68, Brave will become the first iOS Web browser to try to upgrade all sites to HTTPS by default.
Read this article →