Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really, really wish Apple would update Safari for uBlock Origin. I’m about to publish a Safari extension (a NoScript equivalent) and the content blocking APIs are so limited. iOS is even worse than the Mac, too. On iOS AFAIK you can’t even reload the page for the user.


That will never happen. Apple moved several years ago to the “content blocking rules” mode on iOS, where all that any blocker can provide is a set of rules to match URLs with (to put it in simpler terms). Safari would lookup every request against the rules and block requests without the extension getting any information about which URLs were visited, which rules matched, and which ones were blocked. More recently, it moved to the same model in desktop Safari too (there’s a detailed post on the uBlock Origin issues/forum about why there will never be a uBlock Origin for Safari even though the browser has started supporting WebExtensions).

The way uBlock Origin and similar extensions on desktop browsers like Firefox work is by intercepting all requests, which means it can exfiltrate your browsing behavior and/or sell that. I’m confident that uBlock Origin doesn’t exfiltrate data, but the same cannot be said of other extensions in this space.

Apple, with its already restrictive content blocking model, will not allow a way for extensions to look at requests or manipulate requests. Chrome’s Manifest V3, whenever it’s adopted on the release version of Google Chrome, will also kill uBlock Origin (it allows requests to be seen, but not intercepted/modified).


Keep in mind that on iOS you have no browser options AT ALL. You get Safari or skinned Safari.

Per the Apple app store rules, no one may publish a browser or javascript engine and any app that browses the web MUST use safari's webkit.

This is by design so that web feels very bad on iOS compared to native apps, so you'll keep using native apps and Apple will get their 30% of whatever you buy in app.


> This is by design so that web feels very bad on iOS

The reason is because the WebKit engine on iOS is heavily optimized for battery life and can make use of private APIs that further that goal.

Safari and Chrome are essentially the same engine under the hood, the web wouldn't "feel" better if you had one over the other.


> The reason is because the WebKit engine on iOS is heavily optimized for battery life

I'd add security too here. Also, if they allow native Chrome on iOS, Google domination in web standards would be complete and irreversible.


Why are these APIs private, then?


Webkit and blink have diverged significantly


I agree.

Recently Safari on iOS has changed how the back button works so pressing back now takes me to the top of the previous page rather than the location I was at before I linked away.

More recently Firefox on iOS also behaves this way.


The irony is that this is the model the new Chrome API was going towards, and Apple has been using it forever, but when Google goes to do it, everyone has tinfoil theories about how Google is specifically doing it to kill ad-block extensions, but when Apple does it, very few people complained.

Realistically, it's probably more security and battery efficient. I doubt they'll undo it.


To be fair the ad-blockers available for Safari are severely limited compared to what can be done in Chrome. Things like YouTube ads for example aren't blocked reliably in Safari in my experience.


That was my point exactly, and no one ever claims Safari's model is done for bad reasons, but if Google were to do something similar to Safari, they would get a ton of hate.


The other side of the coin of content filtering is the possibility of snooping and data exfiltration.


> The other side of the coin of content filtering is the possibility of snooping and data exfiltration.

I am relatively naive in this realm, but this is why I chose Firefox Focus as my iOS Safari context blocker.

Firefox Focus also seems like a great browser to have set as the default in apps like Apollo.


On iOS, the content blocking model has never exposed one’s browsing history to the blocking extensions. Whether it’s Firefox Focus or some other content blocker enabled in Safari settings (you can enable more than one), the extensions can only provide a set of URL patterns that the underlying Safari browser engine (used by Firefox Focus and every other browser on iOS) will match with requests and block. No information —about which URLs were visited or matched with the blocking rules or which ones were blocked — is ever known to the content blocker app/extension.


You should give Insight Browser on iOS a chance. It’s literally safari + ad-block and some other goodies bundled up under a nice to use interface.


Literally all browsers in iOS are safari + some other goodies. But thanks for the suggestion, it seems to have some useful extensions!


> you can’t even reload the page for the user

Can you explain why you'd want to do this? At first blush it seems like a terrible idea to allow extensions to reload pages.


On the ublock origin UI you can click a little icon in the toolbar pull up the settings for that page. There is a little icon you that shows you whether it is enabled or disabled both in the toolbar and in this settings page. Clicking it in the settings page toggles the state for that page which is retained next time you visit.

When you change the state a little refresh icon appears right behind the status icon indicating that the state of the page as shown doesn't match your setting. Clicking it reloads the page.

You could reload it automatically at state change but this might break whatever the user is in the middle of doing.

You don't have to have this feature but it is handy that the reminder that the page is out of sync is a button to fix this and that it is half an inch from your current mouse position.


I created an extension that flushes all cookies and local storage for the current domain; it then reloads the page so you appear to be a fresh new visitor.


Name?


It's called "Howdy Stranger", it's listed in both Firefox and Chrome official add-on stores.


You just got yourself an install. The VMware partner portal is so buggy i need to do temporary containers all the time, but this is nice. Thanks mate!




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: