Before iOS 9 (or something) that JIT engine wasn't even exposed in the web view available for apps, so no matter what you did, you couldn't match the performance of Safari.
On iOS browsers like Chrome and Firefox are basically unable to compete in terms of performance, web standards or features like browser plugins. So people that use them do so just to get sync. Of course Safari Mobile is decent nowadays, but that's not the issue.
Not outdated (it's always been the same WebKit version as used by Safari), but security restrictions on iOS (specifically, third-party iOS apps can't JIT-- the OS won't let apps without a specific entitlement execute from a writable section of memory) prevented in-app web views from using the same Javascript engine as Safari.
iOS 9 eliminated that performance penalty-- it introduced a new kind of web view backed by an out-of-process renderer and JS engine, which, since it's Apple-blessed, doesn't have the JIT restriction. Third-party browsers updated to use the new framework can get the same performance as Safari.
Third-party browsers updated to use the new framework can get the same performance as Safari.
But that framework is missing various things, such as content blocking. (That goes a long way to explain why there's both "Focus" and "Firefox" on iOS)
> But that framework is missing various things, such as content blocking
Not really - SFSafariViewController uses content blockers, autofill, etc. There's also WKWebView for those that want to implement their own content blockers and autofill engines.
Curious why you'd want safari's content blockers to run inside chrome or firefox though? That's not how browser plugins work anywhere else, and it seems like if content blockers were forced in to 3rd party browsers there'd be a lot more angst over that decision.
> Curious why you'd want safari's content blockers to run inside chrome or firefox though?
Because WKWebView has such a limited API that it currently is impossible to implement content blocking.
WKWebView is both a blessing and a curse for browsers like Chrome and Firefox.
A blessing because tt works really well inside that square area where content is rendered. It is as fast as Safari, as responsive to touch gestures, supports web APIs pretty well.
A curse because the API that it exposes is completely lacking. No way to intercept network requests, no way to interact with the DOM, no way to interact with JavaScript, no way to customize it fully, no way to do proper session store/restore, no way to interact with its internal caches, no way to set the cookie policy, no way to customize the context menus that it exposes, no way to handle errors better, no way to set headers on requests, no way to use content filters ..
I can go on for a while. You can look at the Chrome and Firefox source code to understand the crazy workaround both browsers had to do to get some pretty basic functionality.
Search for WKWebView on https://bugz.webkit.org to see what people have been asking for, for the past three years.
Not sure why this is downvoted because gcp is correct.
Apple has decided that Content Blocking is a Safari only feature. Apple has made the decision to not expose the private APIs in WKWebView that would allow browsers like Chrome and Firefox to use the same speedy content blocking.
The old WebView, UIWebView, also does not support content blocking. But since it runs completely in the same process as your app, you can replace the HTTP handling with your own and patch content blocking on top of that.
That is what Firefox Focus and Brave do for example. It works, but it is far from ideal. Also, it is likely an API on the way to be deprecated.
> Not really - SFSafariViewController uses content blockers, autofill, etc.
SFSafariViewController is useles for apps like Chrome and Firefox. It is an embedded Safari controller. Not an embedded generic webview controller.
SFSafariViewController has zero API. All it can do is display a webpage. Applications that use it have zero ability to even modify the UI.
That is intentional. It is supposed to be a Safari view. And for security reasons that is probabl good, otherwise it would be a gateway to your browsing data.
SFSafariViewController essentially IS safari. It isn't appropriate for a third-party browser.
While it is technically possible to use content blockers in WKWebView, it can only be done via private APIs, and Apple capriciously bans apps from their appstore that use private APIs.
On iOS browsers like Chrome and Firefox are basically unable to compete in terms of performance, web standards or features like browser plugins. So people that use them do so just to get sync. Of course Safari Mobile is decent nowadays, but that's not the issue.