4 ms·
It’s almost as if the browser should provide an method for extensions to identify things to block, in a way that is optimised for performance and privacy, rathe
by stephenr 6y ago
It’s almost as if the browser should provide an method for extensions to identify things to block, in a way that is optimised for performance and privacy, rather than just throwing even more JavaScript into the page.
- aswan 6y agoChrome has a beta extension API that does this: https://developer.chrome.com/extensions/declarativeNetRequest https://developer.chrome.com/extensions/declarativeNetReques... However, this API could be used to optimize some of (not all of) the networking filtering that uBO does. Network filtering is distinct from cosmetic filtering, the latter is what injects scripts into every page. The uBO wiki has some nice documentation of the different features, measurements of their overhead, etc. E.g.: https://github.com/gorhill/uBlock/wiki/Doesn't-uBlock-Origin-add-overhead-to-page-load%3F https://github.com/gorhill/uBlock/wiki/Doesn't-uBlock-Origin...
- stephenr 6y agoDoes network filtering not rely on JavaScript now?
- aswan 6y agoThe webRequest api uses javascript, but with code that runs in the context of the extension, not code that is injected into web pages. You can read a bit more here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
- stephenr 6y agoGreat so not javascript running "in the context" of the page.. just javascript running.. somewhere else, for every single network request that is made, and that still has access to the page. I know a lot of web developers don't want to hear this, but throwing more javascript at the problem isn't always the best solution.
- jsjohnst 6y ago> It’s almost as if the browser should provide an method for extensions to identify things to block Safari[0] has this and has had for a while now... While maybe not as effective as uBlock Origin, I have extensions I use that leverage that API on iOS and MacOS that do a good enough job for my needs. [0] https://developer.apple.com/documentation/safariservices/creating_a_content_blockerYep https://developer.apple.com/documentation/safariservices/cre...
- stephenr 6y agoAhem. Yes, I am aware of this. Sarcasm really doesn't convey well via text.