by smaddock · 5y ago · 0 comments
I've been working towards implementing greater support for Chrome extensions in Electron which has involved reading and interacting with Chromium code [0].
- Using service workers instead of a hidden background webpage is more idiomatic for web developers.
- Forced non-persistent extensions guides developers to a better implementation which relies on less resources.
*The deprecation of webRequest's blocking behavior is what's most concerning. The implementation in Manifest V2 requires sending a message back and forth between processes with JS processing for each network request which seems to be in part why they redesigned it.
However, that optimization costs so much for innovative ad blocking technologies as gorhill of uBlock Origin has mentioned. When ad blocking begins requiring new methods of detection or filtering, it'll now be up to Chromium maintainers to implement support for it in the new declarativeNetRequest API. This is a tradeoff of performance for reduced flexibility where it is absolutely needed.
It's not like background webpages are broken or even hard to use. It's not like everyone's clamoring for their ad blockers to use less resource or for Chrome to be faster.
There was a time when I switched to Chrome because I believed it to be superior. Now that I find the extensions I use to be nearly as important as the browser itself, I can't imagine why ad-hating privacy-focused individuals would punish themselves by using Chrome. Firefox has a few performance quirks in contrast to Chrome, but overall it's in a state where it competes in most cases. As much as I can complain about Mozilla's organizational issues, I can be far more assured that they aren't going to cause my extensions to become nerfed for A Good Reason (TM).
> It's not like everyone's clamoring for their ad blockers to use less resource or for Chrome to be faster.
some people do: https://news.ycombinator.com/item?id=28672377 - "Brave reduces the page load performance cost of its adblocker"
original article having some impressive improvement numbers.
Does anyone seriously believe that an advertising company wants to improve the performance of ad blockers? It's obvious what Google is doing.
If you want to see where things are going in the long run, look at Chrome for Android where you can't install ad-blockers at all.
The change happened, uBlock Origin broke for Safari and here we are several years later and the Safari ad blocker ecosystem is an absolute joke and most of it barely works or demands subscription fees (and the ones that do are certainly not worth paying for because they don't even block YT ads)
I still use Safari for banking and eCommerce because its beta, but for everything else its wonderful. I even get a quality vertical tabs implementation built into the browser; can also shrink the top bar to pre-14/15 size in combination.
The browser will eventually be behind a paywall once the beta is up, but I'm all onboard for paying for an alternative to both Chromium and non-XUL Gecko.
AdGuard can[1] but it’s a cumbersome process.
1Blocker had to develop a bespoke solution but it works seamlessly[2].
[1]: https://adguard.com/en/article/how-to-block-ads-on-youtube.h...
[2]: https://backstage.1blocker.com/how-to-block-youtube-ads-in-s...
It just uses the old APIs for blocking video.
The bulk of the blocking work, however, is still done by the recommended blocking API.
So far Apple seems happy with that.
I'd argue the same folks are ok with looting Neiman Marcus stores during some protests because "they've rigged the system and are all rich anyways"
We develop a Safari ad blocker [1] that works on iOS and macOS which provides performant and private ad blocking. Unlike previous ad blockers using other extension mechanisms, it also can’t see which web pages you visit. We recently released best in class YouTube ad blocking features too. The mechanisms for doing this is different, but the ad blocking results are as good with better performance.
Despite the fact that most of your posts on HN are ads for magiclasso, the fact remains that even most basic features (like whitelisting or blocking cookie banners) require payment.
Furthermore, you do not even come close to uBlock origin. Of course, we both know this, because it simply is not possible. Apple does not allow it. And yet, you continue to state the opposite even though it simply is not true.
On other platforms, using *entirely free* addons like uBlock, you can zap away annoying elements/bars/overlays... or enable some requests while blocking others selectively. You can block videos on some news websites, but allow javascript galleries, and do the opposite on a video site. You can block that overlay disabling right clicks or hijacking the scroll bar. Once you know that it is possible, you do this every day.
None of that is possible with your product, magiclasso.co, no matter how much money I pay you or how many ads you write on hackernews.
There's a fine line when shilling your own product here. One should be humble.
If you write: Yes, compared to other platforms, the adblock ecosystem in Safari is absolutely dismal. However, we have this product where we are doing our best... Okay...
What you write there? ugh sorry, but no.
Does uBlock Origin also use a slow, memory and performance inefficient means of blocking ads? Yes.
Does uBlock Origin also use ad blocking ruleset that have thousands of obsolete rules that are rarely pruned, leading to the complaints that Safari only supported 50,000 rules in a single extension? Yes.
There's a lot of Pros and Cons with different products. uBlock Origin has a lot of Pros for certain types of users and it's a fantastic tool – but it's approach to ad blocking is becoming legacy at this stage. They should be planning to re-architect their approach to suit a more modern, privacy focused API that is supported by the two biggest browser makers.
I was always fine with _some_ ads but eventually got ublock when the internet hit this critical mass of being all ads all the time. If safari adblockers can keep the browser experience _mostly_ ad free out of the box then they are equivalent to me as an unsophisticated user at least
Out of curiosity, can Magic Lassoo present a detailed list of domain connection attempts by category, i.e. do anything like uMatrix does? The thing that keeps me on FF, even on MacOS (aside from warm fuzzy open source feelings) is that I really think the extension ecosystem is the best -- uMatrix, greasemonkey and the ilk are brilliant. I like Safari's isolated private browsing mode most of the time, and I like its dev tools. But the adblock situation is just so much better on FF; it makes the web usable again whilst respecting my privacy ideals. I really like being able to say 'Thou shalt not set thine cookie and contact all of these domains via an XHR request' and the site just...continuing to work.
It's people selling you a subscription product that is vastly inferior to any free extension on Firefox (not on iOS obv) and the same discussion has been had many times before.
I mean, I don't want to be a negative nancy here, but it does get annoying with these ads that seemingly have lost all perspective of how bad adblocking on Safari truly is.
I invite you to go through all daily commits made in uBlock Origin's specific filter lists to solve reported real-world issues[1], and find out if every single one of these issues can also be solved in a typical Safari content blocker, just as they are immediately solved in uBlock Origin.
For instance, it would be an interesting exercise to find out how many of the fixes committed between Sep. 21 and Sep. 27 inclusively can or cannot be also be fixed in a typical Safari content blocker.
* * *
This could be an area where MV3 walks itself back. One proposal creates an Extension Worker which is a new concept like a Service Worker but better matches the use cases for background scripts. Another simply puts background pages back, but behind a permission.
[0] https://github.com/w3c/webextensions/labels/topic%3A%20servi...
Hopefully Google and others are receptive to some of the proposals made in the issues. I recognize the value of reintroducing the persistent capabilities to the SW model.
Not all features are equally important, the one seeing a regression is much more important, it's also the feature with a conflict of interest, and the conflict of interest lies in the direction of Google pushing this through over everyone else's objections.
>less resources
Are you an extension developer? Here is a list of issues that extension developers have with requiring Service Workers:
https://github.com/w3c/webextensions/labels/topic%3A%20servi...
Just take a look at this work-in-progress MV3 version of a fairly popular webpage-saver extension called SingleFile:
Many ongoing changes are being made in extensions and the web in general to improve security while reducing capabilities in existing applications.
At this point, for more complex use cases such as one of my own, the only hope is building your own web browser with complete control over its systems. I've changed focus to improving Electron for this reason.
Ideally, I'd like to see MV3 continue supporting the persistent context use case as well as maintaining webRequest blocking support.
Same, which is why I engage with browser representatives in the W3C WebExtensions Community Group.
Unfortunately, the status quo is grim with Firefox seemingly uninterested in standing up to Chrome and citing compatibility as the main reason for following Chrome into mandatory Service Workers.
Prior to the group being formed, most discussion regarding MV3 occurred on the Chrome Extensions Google Group [0]. While feedback was accepted and open there, I hadn't seen the Chrome team acting on it to make changes. That's where most of my pessimism on the situation comes from.
I believe the Chrome team's main motivation is removing any functionality in MV3 which would have the possibility of reducing performance in normal browsing. I personally don't have much hope that they'll be backpedaling on any changes.
[0] https://groups.google.com/a/chromium.org/g/chromium-extensio...
This is fair. For an ad-blocker to be effective today it needs to be invasive, and that doesn't apply to most extensions.
It is too easy to grant invasive privileges to v2 extensions for those that do not understand the consequences. Downloading a whole new browser on the other hand is a far more obvious way of implicitly granting that trust... So I wonder if when push comes to shove, a "uBlocked-Chrome" browser might emerge. To be clear, I am suggesting a uBlock integration project, not a preservation of V2 for extensions.
Which ones? HN does, but a large part of the other sites I frequent need around a second or more to load. With or without ad-blockers - some load faster with, some faster without, but they never enter the "nearly instantly" range, which (last I checked) was 0-250 ms.