Also, generally speaking, the way Safari implements this means that the extension passes on the block list to the browser and Safari itself implements the blocking. This means,
1. It is more private since the extension does not have access to your webpage. 2. It is faster because Safari can do it natively and it is not done in JavaScript.
+1, especially uBO
Does anyone know the latest on uBO coming to Safari (or not)?
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
I could see a privacy case in not letting any and every extension have access to all requests.
People keep making that argument, and I keep having to correct this.
Their webRequest is not blocking but it does support _observing_ all network requests[1], just as is planned with ManifestV3.
The privacy argument can't and shouldn't be used to justify the removal of the blocking capability from the webRequest API.
---
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
Safari Mac does have JavaScript extensions too (iOS only supports content blockers), and everything gorhill says does apply to them. And indeed some vendors ship both a content blocker and a Safari JavaScript extension in the same Mac app (though each one has to be enabled separately in Safari). Thus, it could be argued that this is a distinction without a difference. But from a technical perspective they're entirely different technologies.
The macOS 10.15 SDK did add an API for a Safari JS extension to receive information from a content blocker embedded in the same Mac app, allowing for example the extension to show stats for blocked resources: https://developer.apple.com/documentation/safariservices/sfs...
My personal theory is that Safari content blockers were designed primarily for iOS, which has no Safari web extensions, and the Mac side was a bit of an afterthought.
What reason does Apple give for not allowing blocking, then?
I am unfamiliar, so please feel free to correct me. Thanks for uBO!
Documentation about what can be observed or not is all available online, there is no need to make any assumption:
Firefox: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
Chromium: https://developer.chrome.com/docs/extensions/reference/webRe...
That should answer all questions regarding what can be observed.
I can also choose to enable an extension that does have JavaScript and know that it could observe what I browse.
Vimium and uBlock Origin are pretty much the only two plugins keeping me from switching away from Chrome/Firefox to Safari.
Given all the hype around Safari’s performance on new M1 Macs (and the fact that only Safari supports Apple Pay), I’d love to have parity on these two extensions extensions. It seeems like Web Extensions will not provide enough to fully support uBlock Origin, but maybe their Content Blockers will be a close enough approximation.
At the very least, I hope that Safari will gain a larger userbase from these changes, regardless what I choose to use. Having multiple large, evenly distributed userbases will only make web developers think more about Chrome-first or Chrome-only development.
[1] https://github.com/philc/vimium/issues/3610